1

Topic: Полезные моды

????????? ??????? ?????? ????? ? ?????? ?? ???, ??????? ?? ?????? ????? ??????? ?? ??????.

Administrator / Moderator posts as HTML 1.0 - http://punres.org/viewtopic.php?id=705
????? ?????? ????? ????????????? html, ?? ?? ????????. ???? ??? ????????

Private Messaging System 1.2.x 1.2.2 - http://punres.org/viewtopic.php?id=729
??? ?????? ?????????. ?? ?????? ?????? ???????????? ??. ??????, ?????? ????? ?????? ?????? ????????? ?? ?????.

Easy BBCode 1.0.1 - http://punres.org/viewtopic.php?id=194
?? ??? ????? ??????, ??????? ? ????? ?????? ??????????? ??????. ??? ????????? ?????? ? ??????? ?? ?????? ??????, ????? ?????????? ??????. ??? ??????????? ? ?????, ??? ????????? ?????? (? ????? ?? ????????)


???? ??? ??? ??????????? ????????? ????????? ?? ???? ? ?????? ?????

2

Re: Полезные моды

Easy Poll 1.1.3 - http://punres.org/viewtopic.php?id=542
???????????. ????? ?? ?????? ????? ?????

Re: Полезные моды

??? ???? ??? ?????:
http://www.punres.org/viewforum.php?id=1

ERROR - MIRROR

Re: Полезные моды

???? ? ???????, ???? ? ??? ????????? ???? ??????...

5 (edited by Spy 2006-01-22 21:29)

Re: Полезные моды

Referral Count Mod - ??? ??? ?? ???? ? ????-?????? ??????
Image upload - ? ???? ??? ???????

Re: Полезные моды

>Image upload - ? ???? ??? ???????
????????? ???????? ?????? ? ???????.

>Referral Count Mod - ??? ??? ?? ???? ? ????-?????? ??????
??????? ?????? ?????? ???? - ??????? ??????????.

>???????? AJAX post preview, ?? ????? ? ??? ???? ???????????. ??? ??????, ?? ???? ?????? ????? ??????? ????????????, ? ????????, ??? ??? ??????? ?????????
?? ?? ???????????? ????... ?????? ??? ?? ?????? ?????????.

ERROR - MIRROR

7

Re: Полезные моды

? ??? Image upoad ?????????? ?? ???????
? ?????? ??????????, ???????? ? FF ? IE, ? ????? 7,54 ?? ????????.

8 (edited by Spy 2006-01-22 22:17)

Re: Полезные моды

????? ?????????? ????? ????, ??? ? ?????? ????, ?? ?? ??? ????, ??????? ?????????.
Email_Digests (http://www.punres.org/viewtopic.php?id=740) - ??? ??? ?? ????
Expertise 1.0.1 - ?
Cash Mod 1.1.0  - ?
???? ??? ??? ??? ?? ??????(??? ????? ?????, ?? ????????? ?? ?????? ?? ???? PunRewrite 1.0)?
?? ?????, ? ??? ??????????? ?????? ???? Spam Protection MOD 1.1 (http://www.punres.org/viewtopic.php?id=725), ??? ?? ???????

????? ????? ??? ???????????? ??? ????????? ?????? ???????
???? ????? ??? ??? ????, ????? ??????? ??? ???????? ? ?????????? ??????? ? ??? ????????? ??????, ?? ?????? ???????? ????? 100-?? ?????? ? ????? ???? ??? ?????????? ????? ??? ???? ????????? ?? ?????? ???-???

Re: Полезные моды

Cash Mod 1.1.0  - ?
??? ??? ????????. ?? ?? ???? ?? ????? ??????????? ?????? ? ??? ?????????? ?? ??? ????? ??? ???-?? ?????, ??? ?? ??????, ??? ?? ????? ?? ???????? (?? ????? ????????????). ?? ? ????? ??? ????? ????. ????? ???????? ???. ????? ???? ??????? ??? ????????? ?? ???? ??????.

??????????? ????? ???-?? ?????.

? ???? ????? ? ??????? ?????? ???-?? ????? ??? ????????. ????? ???? ? ?????.

ERROR - MIRROR

10 (edited by Spy 2006-01-23 16:15)

Re: Полезные моды

Expertise 1.0.1, Email_Digests, Spam Protection MOD 1.1 - ?? ?????, ??? ?????? ??? ????.

??? ???????? ??? ?? ????? ??? ?????

???? ???-?????? ???? ????? http://www.punres.org/files.php?pid=22 (Split topic), ?????? ??????? ? ????? ????????? ?? ?????? ? ????? ???? ??????, ?? ? ? ????? ??????, ?.?. ???????????? ???????? ?????????.

??? ?? ????? ??????? ??? RSS, ?? ????? ??????? ?????? ?? ???? ????? ? ????????.

11

Re: Полезные моды

> ?????? ??????? ? ????? ????????? ?? ?????? ? ????? ???? ??????, ?? ? ? ????? ??????, ?.?. ???????????? ???????? ?????????.

????? ????. ??????  ??? ?? ? ??????, ? ? ??????, ???-?? ?????????? ?? ???? ?????? ? ??????? ????. ?????????? ???-?? ????: ??????????? ?????? ???? ??????...

ERROR - MIRROR

12

Re: Полезные моды

Spy
>??? ?? ????? ??????? ??? RSS

???? ????? ????? ?????:
http://punbb.org/forums/viewtopic.php?id=6586

ERROR - MIRROR

13

Re: Полезные моды

Email_Digests - ????????? ??????????? ?? ????? ?????? ? ???????? ??? ? ???? ??? ????? ????????? ?? ???? ???????.

14

Re: Полезные моды

????? ??? ???? ??? ??? ?? ??????:
PunOOgle! - http://punres.org/desc.php?pid=162
PunRewrite 1.0 - http://punbb.org/forums/viewtopic.php?id=9581

??? ???????, ????? ????? ???????? ? ?????, ????? PunOOgle

15

Re: Полезные моды

???????? PunOOgle, ? ??????? ???????? ?? ????? ?????? sad ???? ????? ???-?? ???????????

16

Re: Полезные моды

???????? ?????: PunBB Topic Preview

??????? ????????. ???????? ????? ? ??????.

??????????:
???????? ?? ???????? ???? ? ?????????? ????????? ?????? 256 ???????? ??????? ????? ? ??????????.

ERROR - MIRROR

17

Re: Полезные моды

? ??? ????? ???/???? ?
?????? ???????? ?????

18

Re: Полезные моды

?? ??????? ?????? ???????? ??????????? ????? ?????????. ?? ??? ?? 5-10 Kb
?? ??? ????? ???????????? ??????????? ????????? ??????. ????? ????? ???????????? ??? ????????. ???????? ???: ?????? ? ????????? ???? ?????, ??? ?????? ????????? ??? ?????? ??????. ?????????????? ???? ?? ??????? ????? ???????? ?????????????.
?? ?? ?????.
?????? ??? ??????? ??? ?? ??? ???????? ??? ? ????? ??? ? ? ?????? ? ?????????????? ? IE ????.

ERROR - MIRROR

19

Re: Полезные моды

? ???./????. ?????? ?????? ???? ????? ?? ????? ???????? - ??? ?? ????? ?????? ???, ? ????? ????? ????????, ?? ???? ?????? ?????? ?????.

20

Re: Полезные моды

????.
??? ???????? ????? ???? ????: viewforum.php ? ???? ??????.
? ??? ?????????? ? ???. smile

ERROR - MIRROR

21

Re: Полезные моды

smile ? Punres ?????? ?????? ?? ?????

22

Re: Полезные моды

??? ?? ??? ???? ??? ?? ???????? smile

?????? ? ?????? ?????? ????. ? ??? ?????? ???? ? ????????? ???-?? ???? ?????:

PunBB Topic Preview

????? ? ???? ? zip ?????? ???:
punbb_mod_topic_preview_1_1.zip

ERROR - MIRROR

23

Re: Полезные моды

???: ??????? ????????? ?????? (??????? ??? ?.?. ? ?????? ??? ?? ??????????):

VIEWTOPIC.PHP

Line 186, replace : 
$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts'], true) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());

By :

$result = $db->query('SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM '.$db->prefix.'posts AS p INNER JOIN '.$db->prefix.'users AS u ON u.id=p.poster_id INNER JOIN '.$db->prefix.'groups AS g ON g.g_id=u.group_id LEFT JOIN '.$db->prefix.'online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id='.$id.' ORDER BY p.id LIMIT '.$start_from.','.$pun_user['disp_posts']) or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
Line 311, after : 
            $signature = parse_signature($cur_post['signature']);
            $signature_cache[$cur_post['poster_id']] = $signature;
        }
    }

Add :
   

$resultb = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$id.' ORDER BY posted LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
    $topic_post_id = $db->result($resultb);
    $is_topic_post = ($cur_post['id'] == $topic_post_id) ? true : false;
Line 314, replace : 
    <h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?> </span><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>

By :
   

<h2><span><span class="conr">#<?php echo ($start_from + $post_count) ?> </span><?php if($is_admmod && !$is_topic_post) : ?><input type="checkbox" name="ps<?php echo $cur_post['id'] ?>" class="postselection" /><?php endif; ?><a href="viewtopic.php?pid=<?php echo $cur_post['id'].'#p'.$cur_post['id'] ?>"><?php echo format_time($cur_post['posted']) ?></a></span></h2>
Line 350, after : 
        <ul><li><a href="index.php"><?php echo $lang_common['Index'] ?></a></li><li> » <a href="viewforum.php?id=<?php echo $cur_topic['forum_id'] ?>"><?php echo pun_htmlspecialchars($cur_topic['forum_name']) ?></a></li><li> » <?php echo pun_htmlspecialchars($cur_topic['subject']) ?></li></ul>

Add :
       

<?php if($is_admmod) : ?>
        <p class="postlink conr" style="width:50%">
        <?php echo $lang_topic['Select label'] ?> :
        <select name="postselection_action" onchange="var urlget='';var chps=document.getElementsByTagName('input');for(var i=0;i<chps.length;++i){if(chps[i].className=='postselection'&&chps[i].checked==true) urlget+='&p'+chps[i].name.substring(2)} document.location='moderate.php?fid=<?php echo $cur_topic['forum_id'] ?>&ptid=<?php echo $id ?>&actionposts='+this.value+urlget">
        <optgroup label="<?php echo $lang_topic['Select label groupe'] ?>">
            <option style="font-style:italic"><?php echo $lang_topic['Select Action'] ?></option>
            <option value="move"><?php echo $lang_topic['Select Deplacer'] ?></option>
            <option value="delete"><?php echo $lang_topic['Select Supprimer'] ?></option>
            <option value="fusion"><?php echo $lang_topic['Select Fusionner'] ?></option>
        </optgroup>
        </select></p>
        <?php endif; ?>
MODERATE.PHP
Line 451, after : 
            <p><input type="submit" name="delete_topics_comply" value="<?php echo $lang_misc['Delete'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
        </form>
    </div>
</div>
<?php

    require PUN_ROOT.'footer.php';
}

Add :

// Traitement de posts en masse
else if (isset($_GET['actionposts']))
{

    // Recuperation et serialization des posts concern?s
    if(!isset($_POST['confirm'])) {
        foreach($_GET as $key => $value) {
            if(empty($value))
                $aposts[] = substr($key,1,strlen($key));
        }
        if(!isset($aposts))
            message($lang_misc['Erreur posts selection']);
        $posts = serialize($aposts);
    }

    switch($_GET['actionposts']) {

        // D?placement de posts
        case 'move' :

            if(!isset($_POST['confirm'])) {

                //confirm_referrer('viewtopic.php'); // Bug IE
                $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Moderate'];
                require PUN_ROOT.'header.php';

                ?> <div class="blockform">
                    <h2><?php echo $lang_misc['Deplacer posts'] ?></h2>
                    <div class="box">
                        <form method="post" action="moderate.php?fid=<?php echo $fid ?>&ptid=<?php echo $_GET['ptid'] ?>&actionposts=move">
                            <input type="hidden" name="posts" value="<?php echo urlencode($posts) ?>" />
                            <div class="inform">
                                <fieldset>
                                    <legend><?php echo $lang_misc['Choisir topic'] ?></legend>
                                    <div class="infldset">
                                        <p><?php echo $lang_misc['Topic destination'] ?><br />
                                        <input type="text" style="width:50%" name="postsmoveto" /><br />
                                        <br />
                                        <input type="checkbox" name="anterieurs" value="1" /> <?php echo $lang_misc['Avertissement date'] ?></p>
                                    </div>
                                </fieldset>
                            </div>
                            <p><input type="submit" name="confirm" value="<?php echo $lang_misc['Deplacer posts ok'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
                        </form>
                    </div>
                </div> <?

                require PUN_ROOT.'footer.php';
                break;

            } else {

                confirm_referrer('moderate.php');
                require PUN_ROOT.'include/search_idx.php';

                // Extraction de l'id du topic de destination
                preg_match('/id=([0-9]+)/',$_POST['postsmoveto'], $postsmoveto);
                if(empty($postsmoveto[1]))
                    message($lang_misc['Erreur topic destination']);
                $posts = unserialize(urldecode(stripslashes($_POST['posts'])));

                $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$postsmoveto[1].' ORDER BY posted LIMIT 1');
                $topic_post_id = $db->result($result);
                for($i=0; $i < count($posts); $i++) {
                    // On r??crit les messages qui sont plus anciens que le topic ou tous si anterieurs a ?t? coch? pour avoir un id r?cent
                    if($posts[$i] < $topic_post_id || isset($_POST['anterieurs'])) {
                        $post = $db->fetch_assoc($db->query('SELECT * FROM '.$db->prefix.'posts WHERE id='.$posts[$i]));
                        $db->query('INSERT INTO '.$db->prefix.'posts(poster,poster_id,poster_ip,poster_email,message,hide_smilies,posted,edited,edited_by,topic_id) VALUES("'.$post['poster'].'", "'.$post['poster_id'].'", "'.$post['poster_ip'].'", '.(!isset($post['poster_email']) ? 'NULL' : '"'.$post['poster_email'].'"').', "'.$post['message'].'", "'.$post['hide_smilies'].'", "'.time().'", '.(!isset($post['edited']) ? 'NULL' : '"'.$post['edited'].'"').', '.(!isset($post['edited_by']) ? 'NULL' : '"'.$post['edited_by'].'"').', "'.$postsmoveto[1].'")');
                        // On supprime les doublons qui comportent l'ancienne date
                        delete_post($posts[$i], $_GET['ptid']);
                        // On supprime la cl? du topic qui n'est plus ? ?crire
                        unset($posts[$i]);
                    }
                }

                // Si il reste des topic qui sont ? ins?rer avec leur date initiale
                if(!empty($posts))
                    $db->query('UPDATE '.$db->prefix.'posts SET topic_id='.$postsmoveto[1].' WHERE id='.implode(' OR id=',$posts));

                redirect('viewtopic.php?id='.$postsmoveto[1], $lang_misc['Posts deplaces']);
                break;

            }


        // Supprimer des posts
        case 'delete' :

            if(!isset($_POST['confirm'])) {

                //confirm_referrer('viewtopic.php'); // Bug IE
                $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Moderate'];
                require PUN_ROOT.'header.php';

                ?> <div class="blockform">
                    <h2><?php echo $lang_misc['Supprimer posts'] ?></h2>
                    <div class="box">
                        <form method="post" action="moderate.php?fid=<?php echo $fid ?>&ptid=<?php echo $_GET['ptid'] ?>&actionposts=delete">
                            <input type="hidden" name="posts" value="<?php echo urlencode($posts) ?>" />
                            <div class="inform">
                                <fieldset>
                                    <legend><?php echo $lang_misc['Confirmer'] ?></legend>
                                    <div class="infldset">
                                        <p><?php echo $lang_misc['Confirmer suppression'] ?><br />
                                    </div>
                                </fieldset>
                            </div>
                            <p><input type="submit" name="confirm" value="<?php echo $lang_misc['Supprimer posts ok'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
                        </form>
                    </div>
                </div> <?

                require PUN_ROOT.'footer.php';
                break;

            } else {

                confirm_referrer('moderate.php');
                require PUN_ROOT.'include/search_idx.php';

                $posts = unserialize(urldecode(stripslashes($_POST['posts'])));

                // On v?rifie que le post initial du topic ne fait pas partie de la s?lection
                $result = $db->query('SELECT id FROM '.$db->prefix.'posts WHERE topic_id='.$_GET['ptid'].' ORDER BY posted LIMIT 1');
                $topic_post_id = $db->result($result);
                if(isset($posts[$topic_post_id]))
                    unset($posts[$topic_post_id]);

                // On supprime les topics concern?s
                foreach($posts AS $post)
                    delete_post($post, $_GET['ptid']);

                redirect('viewtopic.php?id='.$_GET['ptid'], $lang_misc['Posts supprimes']);
                break;

            }


        // Fusionner des posts
        case 'fusion' :

            if(!isset($_POST['confirm'])) {

                //confirm_referrer('viewtopic.php'); // Bug IE
                $page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / '.$lang_misc['Moderate'];
                require PUN_ROOT.'header.php';

                ?> <div class="blockform">
                    <h2><?php echo $lang_misc['Fusionner posts'] ?></h2>
                    <div class="box">
                        <form method="post" action="moderate.php?fid=<?php echo $fid ?>&ptid=<?php echo $_GET['ptid'] ?>&actionposts=fusion">
                            <input type="hidden" name="posts" value="<?php echo urlencode($posts) ?>" />
                            <div class="inform">
                                <fieldset>
                                    <legend><?php echo $lang_misc['Confirmer'] ?></legend>
                                    <div class="infldset">
                                        <p><?php echo $lang_misc['Separer fusion'] ?><br />
                                        <textarea name="fusion_sep"></textarea><br />
                                        <br />
                                        <?php echo $lang_misc['Avertissement fusion'] ?>
                                    </div>
                                </fieldset>
                            </div>
                            <p><input type="submit" name="confirm" value="<?php echo $lang_misc['Fusionner posts ok'] ?>" /><a href="javascript:history.go(-1)"><?php echo $lang_common['Go back'] ?></a></p>
                        </form>
                    </div>
                </div> <?

                require PUN_ROOT.'footer.php';
                break;

            } else {

                confirm_referrer('moderate.php');
                require PUN_ROOT.'include/search_idx.php';

                $posts = unserialize(urldecode(stripslashes($_POST['posts'])));
                sort($posts);
                reset($posts);

                // On r?cup?re et on concat?ne les diff?rents messages
                $message_add = '';
                for($i=0; $i < count($posts); $i++)
                    $message_add .= $db->result($db->query('SELECT message FROM '.$db->prefix.'posts WHERE id='.$posts[$i])).$_POST['fusion_sep'];

                // On ?crit la concat?nation ? la place du message du plus ancien post
                $db->query('UPDATE '.$db->prefix.'posts SET message="'.$message_add.'" WHERE id='.$posts[0]);

                // On supprime tous les messages sauf le plus ancien
                unset($posts[0]);
                foreach($posts AS $post)
                    delete_post($post, $_GET['ptid']);

                redirect('viewtopic.php?id='.$_GET['ptid'], $lang_misc['Posts fusionnes']);
                break;

            }


        // Destination par d?faut - Erreur
        default :
            message($lang_misc['Erreur action']);

    }
}
LANG/ENGLISH/MISC.PHP
At the end, replace : 
);

By :

,
// Mass post management
'Erreur action'            =>    'Error: The wished action isn\'t available',
'Erreur posts selection'    =>    'Error: You haven't select any post',
'Deplacer posts'        =>    'Move posts',
'Choisir topic'            =>    'Choose the destination topic',
'Topic destination'        =>    'Destination topic URL',
'Avertissement date'        =>    'Apply the current date to display the posts at the bottom (in the contrary case, the order of publication will be respected)<br /><br /><strong>Caution</strong>, the oldest posts than the topic destination will be automatically placed at the end of this one.',
'Deplacer posts ok'        =>    'Move',
'Erreur topic destination'    =>    'Error: The destination topic URL isn't valid',
'Posts deplaces'        =>    'The posts were indeed moved',
'Supprimer posts'        =>    'Delete posts',
'Confirmer'            =>    'Confirm',
'Confirmer suppression'        =>    'Confirm to delete the selected posts ?',
'Supprimer posts ok'        =>    'Delete',
'Posts supprimes'        =>    'The posts were indeed deleted',
'Fusionner posts'        =>    'Amalgamate posts',
'Separer fusion'        =>    'Separate the posts by',
'Avertissement fusion'        =>    '<strong>Note :</strong> The finally post will have the most older post informormations.',
'Fusionner posts ok'        =>    'Amalgamate',
'Posts fusionnes'        =>    'The posts were indeed amalgamated'
);
LANG/ENGLISH/TOPIC.PHP
At the end, replace : 
);

By :

,
'Select label'            =>    'For the selection',
'Select label groupe'        =>    'Selection management',
'Select Action'            =>    'Action',
'Select Deplacer'        =>    'Move posts',
'Select Supprimer'        =>    'Delete posts',
'Select Fusionner'        =>    'Amalgamate posts'
);

STYLE/IMPORTS/BASE.CSS

At the end, add : 
INPUT.postselection {
    MARGIN-TOP: -5px;
    MARGIN-RIGHT: 5px
}
ERROR - MIRROR

24

Re: Полезные моды

by - ??? ??????.
add - ???????? ???? ?

25

Re: Полезные моды

??.

?????? ?????? ???, ? ??? ???-??? ?? ???????? ??????.
?????? ? ???? ????? ???? ??? ????????: Line 314, replace :

ERROR - MIRROR