مودهاي سودمند phpBB ( آپدیت هفتگی )

شروع موضوع توسط Hyper ‏5 سپتامبر 2005 در انجمن مود ها و قالب های phpBB

وضعیت موضوع:
موضوع بسته شده است.
  1. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : نمايش تاريخ آخرين ارسال يا Add Last User Post Date to Members List
    ¤ شرح : تاريخ و ساعت آخرين ارسال كاربر را در ليست اعضا نمايش ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    $Id: last_post_date.txt,v 1.2 2003/07/03 12:10:25 nivisec Exp $
    ###############################################
    ##   Hack Title:   Add Last User Post Date to Members List
    ##                 (A phpBB2 Quickie)
    ##   Author:       Nivisec ([email protected])
    ##                 http://www.nivisec.com
    ##   Description:  Adds a new field in the members list that displays the date
    ##                 that the user last posted on.  "None" will be displayed if
    ##                 the user has never posted.
    ##
    ##   Compatibility:   2.0.x
    ##
    ##   Support:      http://www.phpbbhacks.com/forums
    ##   Copyright:      ©2003 Billy Sauls
    ##
    ###############################################
    #
    #-----[ OPEN ]------------------------------------------
    #
    memberlist.php

    #
    #-----[ FIND ]------------------------------------------
    #
        L_POSTS => $lang[Posts],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
        L_POST_TIME => $lang[Last_Post] .   . $lang[Time],

    #
    #-----[ FIND ]------------------------------------------
    #
            $row_color = ( !($i % 2) ) ? $theme[td_color1] : $theme[td_color2];
            $row_class = ( !($i % 2) ) ? $theme[td_class1] : $theme[td_class2];

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

            $post_time_sql = "SELECT post_time
                FROM " . POSTS_TABLE . "
                WHERE poster_id = " . $user_id . "
                ORDER BY post_time DESC
                LIMIT 1";

            if ( !($post_time_result = $db->sql_query($post_time_sql)) )
            {
                message_die(GENERAL_ERROR, Error getting user last post time, , __LINE__, __FILE__, $post_time_sql);
            }

            $post_time_row = $db->sql_fetchrow($post_time_result);
            $last_post_time = ( isset($post_time_row[post_time]) ) ? create_date($board_config[default_dateformat], $post_time_row[post_time], $board_config[board_timezone]) : $lang[None];

    #
    #-----[ FIND ]------------------------------------------
    #
                YIM => $yim,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
                LAST_POST_TIME => $last_post_time,

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/memberlist_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
          <th class="thTop" nowrap="nowrap">{L_JOINED}</th>
          <th class="thTop" nowrap="nowrap">{L_POSTS}</th>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
          <th class="thTop" nowrap="nowrap">{L_POST_TIME}</th>

    #
    #-----[ FIND ]------------------------------------------
    #
          <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.JOINED}</span></td>
          <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
          <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.LAST_POST_TIME}</span></td>

    #
    #-----[ FIND ]------------------------------------------
    #
          <td class="catbottom" colspan="8" height="28">&nbsp;</td>

    #
    #-----[ REPLACE ]------------------------------------------
    #
          <td class="catbottom" colspan="9" height="28">&nbsp;</td>

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    #End
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  2. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : آواتار پيش فرض يا Default avatar
    ¤ شرح : در صورت عدم انتخاب آواتار توسط كاربر ، آواتار تعيين شده توسط ادمين جايگزين ميشود


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    ##############################################################
    ## MOD Title: Default avatar
    ## MOD Author: Manipe < [email protected] > (N/A) http://www.manipef1.com
    ## MOD Description: Lets the administrator choose a default avatar, if a user hasnt already selected one. The default avatar can be changed through the ACP. You can also select wheather you want to display the default avatar for guests, registered users or both, and choose a different default avatar for guests and users.
    ## MOD Version: 1.1.0
    ##
    ## Installation Level: Easy
    ## Installation Time: ~ 5 Minutes
    ## Files To Edit:
    ##      admin/admin_board.php
    ##      language/lang_english/lang_admin.php
    ##      includes/usercp_viewprofile.php
    ##      templates/subSilver/admin/board_config_body.tpl
    ##      viewtopic.php
    ##
    ## Included Files: N/A
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##
    ##  You can choose the default avatar by following the "Configuration" link under the "General Admin" heading, in the left panel of the ACP.
    ##
    ##  Made by request from this topic: http://www.phpbb.com/phpBB/viewtopic.php?t=254117
    ## 
    ##############################################################
    ## MOD History:
    ##
    ##
    ##   2005-01-10 - Version 1.1.0
    ##      - Added a function so you can set a different avatar for users and guests, and so that you can set it so that no default avatar is shown.
    ##
    ##   2005-01-09 - Version 1.0.0
    ##      - First version, seems to work fine.
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################
    #
    #-----[ SQL ]------------------------------------------
    #
    INSERT INTO phpbb_config(config_name, config_value) VALUES (default_avatar_guests_url, );
    INSERT INTO phpbb_config(config_name, config_value) VALUES (default_avatar_users_url, );
    INSERT INTO phpbb_config(config_name, config_value) VALUES (default_avatar_set, 3);

    #
    #-----[ OPEN ]------------------------------------------
    #
    admin/admin_board.php

    #
    #-----[ FIND ]------------------------------------------
    #
    $disable_board_no = ( !$new[board_disable] ) ? "checked="checked"" : "";

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Default avatar MOD, By Manipe (Begin)
    $default_avatar_guests = ($new[default_avatar_set] == 0) ? "checked="checked"" : "";
    $default_avatar_users = ($new[default_avatar_set] == 1) ? "checked="checked"" : "";
    $default_avatar_both = ($new[default_avatar_set] == 2) ? "checked="checked"" : "";
    $default_avatar_none = ($new[default_avatar_set] == 3) ? "checked="checked"" : "";
    // Default avatar MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
        "L_NO" => $lang[No],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Default Avatar MOD, By Manipe (Begin)
        "L_DEFAULT_AVATAR" => $lang[Default_avatar],
        "L_DEFAULT_AVATAR_EXPLAIN" => $lang[Default_avatar_explain],
        "L_DEFAULT_AVATAR_GUESTS" => $lang[Default_avatar_guests],
        "L_DEFAULT_AVATAR_USERS" => $lang[Default_avatar_users],
        "L_DEFAULT_AVATAR_BOTH" => $lang[Default_avatar_both],
        "L_DEFAULT_AVATAR_NONE" => $lang[Default_avatar_none],
    // Default Avatar MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
        "S_DISABLE_BOARD_NO" => $disable_board_no,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Default avatar MOD, By Manipe (Begin)
        "DEFAULT_AVATAR_GUESTS_URL" => $new[default_avatar_guests_url],
        "DEFAULT_AVATAR_USERS_URL" => $new[default_avatar_users_url],
        "DEFAULT_AVATAR_GUESTS" => $default_avatar_guests,
        "DEFAULT_AVATAR_USERS" => $default_avatar_users,
        "DEFAULT_AVATAR_BOTH" => $default_avatar_both,
        "DEFAULT_AVATAR_NONE" => $default_avatar_none,
    // Default avatar MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_admin.php

    #
    #-----[ FIND ]------------------------------------------
    #
    //
    // Thats all Folks!

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    // Default avatar MOD, By Manipe (Begin)
    $lang[Default_avatar] = Set a default avatar;
    $lang[Default_avatar_explain] = This gives users that haven  yet selected an avatar, a default one. Set the default avatar for guests and users, and then select wheather you want the avatar to be displayed for registered users, guests, both or none.;
    $lang[Default_avatar_guests] = Guests;
    $lang[Default_avatar_users] = Users;
    $lang[Default_avatar_both] = Both;
    $lang[Default_avatar_none] = None;
    // Default avatar MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/usercp_viewprofile.php

    #
    #-----[ FIND ]------------------------------------------
    #
            case USER_AVATAR_GALLERY:
                $avatar_img = ( $board_config[allow_avatar_local] ) ? <img src=" . $board_config[avatar_gallery_path] . / . $profiledata[user_avatar] . " alt="" border="0" /> : ;
                break;
        }
    }

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Default avatar MOD, By Manipe (Begin)
        if ((!$avatar_img) && (($board_config[default_avatar_set] == 1) || ($board_config[default_avatar_set] == 2)) && ($board_config[default_avatar_users_url])){
            $avatar_img = <img src=" . $board_config[default_avatar_users_url] . " alt="" border="0" />;
        }
    // Default avatar MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/board_config_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
        <tr>
          <th class="thHead" colspan="2">{L_AVATAR_SETTINGS}</th>
        </tr>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
        <tr>
            <td class="row1">{L_DEFAULT_AVATAR} <br /><span class="gensmall">{L_DEFAULT_AVATAR_EXPLAIN}</span></td>
            <td class="row2"><input type="radio" name="default_avatar_set" value="0" {DEFAULT_AVATAR_GUESTS} /> {L_DEFAULT_AVATAR_GUESTS} &nbsp; <input class="post" type="text" name="default_avatar_guests_url" maxlength="255" value="{DEFAULT_AVATAR_GUESTS_URL}" /><br /><input type="radio" name="default_avatar_set" value="1" {DEFAULT_AVATAR_USERS} /> {L_DEFAULT_AVATAR_USERS} &nbsp; <input class="post" type="text" name="default_avatar_users_url" maxlength="255" value="{DEFAULT_AVATAR_USERS_URL}" /><br /><input type="radio" name="default_avatar_set" value="2" {DEFAULT_AVATAR_BOTH} /> {L_DEFAULT_AVATAR_BOTH}<br /><input type="radio" name="default_avatar_set" value="3" {DEFAULT_AVATAR_NONE} /> {L_DEFAULT_AVATAR_NONE}</td>
        </tr>

    #
    #-----[ OPEN ]------------------------------------------
    #
    viewtopic.php

    #
    #-----[ FIND ]------------------------------------------
    #
                case USER_AVATAR_GALLERY:
                    $poster_avatar = ( $board_config[allow_avatar_local] ) ? <img src=" . $board_config[avatar_gallery_path] . / . $postrow[$i][user_avatar] . " alt="" border="0" /> : ;
                    break;
            }
        }

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Default avatar MOD, By Manipe (Begin)
        if ((!$poster_avatar) && ($board_config[default_avatar_set] != 3)){
            if (($board_config[default_avatar_set] == 0) && ($poster_id == -1) && ($board_config[default_avatar_guests_url])){
                $poster_avatar = <img src=" . $board_config[default_avatar_guests_url] . " alt="" border="0" />;
            }
            else if (($board_config[default_avatar_set] == 1) && ($poster_id != -1) && ($board_config[default_avatar_users_url]) ){
                $poster_avatar = <img src=" . $board_config[default_avatar_users_url] . " alt="" border="0" />;
            }
            else if ($board_config[default_avatar_set] == 2){
                if (($poster_id == -1) && ($board_config[default_avatar_guests_url])){
                    $poster_avatar = <img src=" . $board_config[default_avatar_guests_url] . " alt="" border="0" />;
                }
                else if (($poster_id != -1) && ($board_config[default_avatar_users_url])){
                    $poster_avatar = <img src=" . $board_config[default_avatar_users_url] . " alt="" border="0" />;
                }
            }
        }
    // Default avatar MOD, By Manipe (End)

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #

    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  3. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : مدت زمان ثبت نام يا how many days registered
    ¤ شرح : نمايش تعداد روزهايي كه از ثبت نام كاربر ميگذرد

    توجه : اين مود شامل دو قسمت است ...

    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...

    1. در قسمت مشخصات فردي


    کد (Text):
    ##############################################################
    ## MOD Title: how many days registered
    ## MOD Author: P.T. < [email protected] > (Peter Nijssen) http://www.muziekforumonline.nl
    ## MOD Description: shows how many days that youre a member of the forum in youre profile
    ## MOD Version: 1.0.0
    ##
    ## Installation Level: (Easy)
    ## Installation Time: ~2 Minutes
    ## Files To Edit: includes/usercp_viewprofile.php
    ##        language/lang_XXX/lang_main.php
    ##        templates/XXX/profile_view_body.tpl
    ##       
    ##############################################################
    ## Author Notes: good luck with my thirth mod.
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2004-08-09 - Version 1.0.0
    ##      - Initial Release :)
    ##
    ##############################################################
    ## Security Disclaimer: Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################
    #
    #-----[ OPEN ]------------------------------------------
    #
        includes/usercp_viewprofile.php
    #
    #-----[ FIND ]------------------------------------------
    #
        AVATAR_IMG => $avatar_img,
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
        MEMBERDAYS => $memberdays,
        L_MEMBERDAYS => $lang[Memberdays],
    #
    #-----[ OPEN ]------------------------------------------
    #  
        language/lang_XXX/lang_main.php
    #(change this for every language you use)
    #-----[ FIND ]------------------------------------------
    #
        //
        // Thats all Folks!
        // -------------------------------------------------

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
        $lang[Memberdays] = Total days member;

    #
    #-----[ OPEN ]------------------------------------
    #
        templates/XXX/profile_view_body.tpl
    #(change this for every template you use)
    #-----[ FIND ]------------------------------------------
    #
        <tr>
        <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_JOINED}:&nbsp;</span></td>
        <td width="100%"><b><span class="gen">{JOINED}</span></b></td>
        </tr>
    #
    #-----[ AFTER, ADD ]------------------------------------
    #
        <tr>
        <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_MEMBERDAYS}:&nbsp;</span></td>
        <td width="100%"><b><span class="gen">{MEMBERDAYS}</span></b></td>
        </tr>
    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM

    2. در قسمت نمايش تاپيك ها

    کد (Text):
    ##############################################################
    ## MOD Title: how many days registered
    ## MOD Author: P.T. < [email protected] > (Peter Nijssen) http://www.muziekforumonline.nl
    ## MOD Description: shows in the topic how many days that youre a member of the forum
    ## MOD Version: 1.0.0
    ##
    ## Installation Level: (Easy)
    ## Installation Time: ~2 Minutes
    ## Files To Edit: viewtopic.php
    ##        templates/XXX/viewtopic_body.tpl
    ##       
    ##############################################################
    ## Author Notes: how many days registered.txt REQUIRED!
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2004-08-09 - Version 1.0.0
    ##      - Initial Release :)
    ##
    ##############################################################
    ## Security Disclaimer: Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################
    #
    #-----[ OPEN ]------------------------------------------
    #
        viewtopic.php
    #
    #-----[ FIND ]------------------------------------------
    #
        $poster_posts = ( $postrow[$i][user_id] != ANONYMOUS ) ? $lang[Posts] . :  . $postrow[$i][user_posts] : ;
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
        $memberdays = ( $postrow[$i][user_id] != ANONYMOUS ) ? $lang[Memberdays] . :  .  max(1, round( ( time() - $postrow[$i][user_regdate] ) / 86400 )): ;   
    #
    #-----[ FIND ]------------------------------------------
    #  
        POSTER_AVATAR => $poster_avatar,
    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
        MEMBERDAYS => $memberdays,
    #
    #-----[ OPEN ]------------------------------------
    #
        templates/XXX/viewtopic_body.tpl
    #(change this for every template you use)
    #-----[ FIND ]------------------------------------------
    #
        {postrow.POSTER_JOINED}<br />
    #
    #-----[ AFTER, ADD ]------------------------------------
    #
        {postrow.MEMBERDAYS}<br />
    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  4. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : آخرين 5 كاربر ثبت نام شده يا last 5 registered users
    ¤ شرح : قسمت آخرين كاربر ثبت نام شده را به 5 كاربر تغيير ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    ##############################################################
    ## MOD Title: last 5 registered users
    ## MOD Author: emrag < [email protected] > (Emrah Türkmen)  www.canver.net
    ## MOD Description: This hack will replace last registered user part with last 5 registered users
    ##
    ##
    ##      ------------------------------------------------------------------
    ##      -                                -
    ##      -   Last registered user: emrag                  -
    ##                                       -
    ##      ---------- change to ------------------------------------------
    ##      -                                -
    ##      -   Last 5 registered users: emrag, blah2, blah3, blah4, blah5   -
    ##      -                                -
    ##      ------------------------------------------------------------------
    ##
    ##
    ## MOD Version: 1.0.0
    ##
    ## Installation Level: Easy
    ## Installation Time : ~3 minute
    ## Files to Edit: index.php
    ##        language/lang_english/lang_main.php
    ##
    ## Ýncluded Files: n/a
    ##############################################################
    ##
    ## Author Note: -
    ##
    ##############################################################
    ##
    ## MOD History: 05.01.2005 - 1.0.0
    ##      - First release
    ##
    ##############################################################
    ##
    ## Before Adding This Hack To Your Forum, You Should Back Up All Files Related To This Hack  
    ##
    ##############################################################
    #
    #-----[ OPEN ]------------------------------------------
    #

    index.php

    #
    #----[ FIND ]------------------------------------------
    #

        //
        // Start output of page
        //

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #

    //
    // last 5 registered users by emrag
    //
    $last_5_users = $lang[Newest_users];

    $sql = "SELECT user_id, username, user_regdate
        FROM " . USERS_TABLE . "
        WHERE 1
        ORDER BY user_regdate DESC LIMIT 5";

    if( !($result = $db->sql_query($sql)) )
    {
        message_die(GENERAL_ERROR, Could not query users, , __LINE__, __FILE__, $sql);
    }

    while( $row = $db->sql_fetchrow($result) )
    {
            if ( $last_5_users == $lang[Newest_users] )
            {
            $last_5_users .= <a href=" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row[user_id]) . " . $style_color .><b> . $row[username] . </b></a>;
            }
            else
            {
            $last_5_users .= , <a href=" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=" . $row[user_id]) . " . $style_color .><b> . $row[username] . </b></a>;
            }
    }
    //
    // last 5 registered users by emrag
    //

    #
    #----[ FIND ]------------------------------------------
    #

            NEWEST_USER => sprintf($lang[Newest_user], <a href=" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . ">, $newest_user, </a>),


    #
    #-----[ REPLACE, WITH ]------------------------------------------
    #

    /* Original phpBB code for newest user - commented out for replace last registered user with last 5 registered users
            NEWEST_USER => sprintf($lang[Newest_user], <a href=" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . ">, $newest_user, </a>),
    */
            NEWEST_USER => $last_5_users,

    #
    #-----[ OPEN ]------------------------------------------
    #

    language/lang_english/lang_main.php

    #
    #----[ FIND ]------------------------------------------
    #

    ?>

    #
    #----[ BEFORE, ADD ]------------------------------------------
    #

    $lang[Newest_users] = Last <b>5</b> registered users: ;

    #
    #-----[ SAVE ALL FILES/CLOSE ]------------------------------------------
    #
    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  5. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : نمايش تاريخ شروع تاپيك يا Mouse Hover Topic Started Date
    ¤ شرح : با نگاهداشتن موس بروي نام تاپيك تاريخ شروع آنرا نمايش ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    #################################################################
    ## Mod Title: Mouse Hover Topic Started Date
    ## Mod Version: 1.0.0 Final
    ## Author: Smartor <[email protected]> - http://smartor.is-root.com
    ## Description: With this MOD an user can see topics started date when he/she
    ##      holds the mouse over the topic title/link on viewforum page
    ##      Only tested with phpBB 2.0.2
    ##
    ## Installation Level:  Extremely Easy
    ## Installation Time:   5 Minutes
    ##
    ## Files To Edit: 3
    ##  viewforum.php
    ##  language/lang_english/lang_main.php
    ##  templates/subSilver/viewforum_body.tpl
    ##
    ## Included Files: n/a
    #################################################################
    ##
    ## Author Note:
    ##
    ##  This evening, i found that i can see topics started date when i
    ##  holds the mouse over the topic title/link on viewforum. But its
    ##  iB, not phpBB. I wanted this stuff on my phpBB too. So i looked
    ##  through the code of viewforum.php and i found some ready variables...
    ##
    #################################################################
    ##
    ## Installation Notes:
    ##
    ##  You should change all your templates and language pack
    ##
    #################################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    #################################################################
    ##
    ## Revision History:
    ##
    ## v1.0.0
    ##  - Initial Release and Final.
    ##
    #################################################################
    ## Example Page:     http://smartor.is-root.com
    #################################################################


    #
    #-----[ OPEN ]--------------------------------------------------
    #
    viewforum.php

    #
    #-----[ FIND ]----------------------------------------
    #
    FIRST_POST_TIME => $first_post_time,

    #
    #-----[ AFTER ADD ]-----------------------------------
    #
    L_TOPIC_STARTED => $lang[Topic_started],


    #
    #-----[ OPEN ]--------------------------------------------------
    #
    language/lang_english/lang_main.php

    #
    #-----[ FIND ]----------------------------------------
    #
    //
    // Thats all Folks!

    #
    #-----[ BEFORE ADD ]----------------------------------
    #
    // Mouse Hover Topic Started Date
    $lang[Topic_started] = Topic started;


    #
    #-----[ OPEN ]--------------------------------------------------
    #
    templates/subSilver/viewforum_body.tpl

    #
    #-----[ FIND ]----------------------------------------
    #
    <a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">

    #
    #-----[ REPLACE WITH ]--------------------------------
    #
    <a href="{topicrow.U_VIEW_TOPIC}" title="{topicrow.L_TOPIC_STARTED}: {topicrow.FIRST_POST_TIME}" class="topictitle">

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  6. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : عدم امكان كپي برداري يا No copy
    ¤ شرح : امكان رايت كليك و كپي برداري را از كاربر ميگيرد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    ##############################################################
    ## MOD Title:          No copy
    ## MOD Author:         Niels < [email protected] > (Niels Chr. Rød) http://mods.db9.dk
    ## MOD Description:    This mod will make it possible for admin to
    ##                     specify per user, if the user are allowed
    ##                     to rigth click / copy from the forum.
    ## MOD Version:        0.9.2
    ## MOD Compatibility:  2.0.6
    ##
    ## Installation Level: Intermediate
    ## Installation Time:  10 Minutes
    ## Files To Edit:      6
    ##      admin/admin_users.php
    ##      includes/page_header.php
    ##      language/lang_english/lang_admin.php
    ##      language/lang_english/lang_main.php
    ##      templates/subSilver/overall_header.tpl
    ##      templates/subSilver/admin/user_edit_body.tpl
    ##
    ## Included Files:     1
    ##      no_copy_db_update.php
    ##
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##
    ## 1. EasyMOD
    ## -----------
    ## This MOD is compatible and can be installed by EasyMOD
    ## of Nuttzy (but is not officially EasyMOD Compliant)!
    ## http://area51.phpbb.com/phpBB22/viewforum.php?sid=&f=15
    ##
    ## However, on alpha releases of EM and meanwhile beta or
    ## final release some actions are NOT performed.
    ## Youll have to do them manually !
    ##
    ## 1.1 SQL commands are not performed
    ## -----------
    ## This MOD need a database update.
    ## Then, in any case if you install this MOD manually or using
    ## an alpha release of EM, please copying the *_db_update.php
    ## in your phpBB root directory, run it with your navigator,
    ## and then delete it from the phpBB root directory.
    ##
    ## Please, do it NOW! Before editing phpBB files by EM or manually!!!
    ## Otherwise, you may have an error message during your next
    ## connection.
    ##
    ## 1.2 Translation are not managed
    ## -----------
    ## Moreover, EM can not already manage actions for any other
    ## language than English (but language intructions are proceed
    ## to all installed languages in order to prevent errors).
    ## So the translations provided with this MOD must be installed
    ## manually if you need them.
    ##
    ## 2. Official last version link
    ## -----------
    ## Meanwhile the phpBB group validation and as the MOD is not yet
    ## in the phpBB MOD database, check this official link for updates...
    ## http://mods.db9.dk/viewtopic.php?t=3060
    ##
    ## 3. Warning
    ## -----------
    ## The mod will ONLY work if the client have enabled javascript
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2003-12-17 - Version 0.9.2
    ##      - phpBB template & EasyMOD compliance enhancement
    ##      - Dutch, French & Italian translations now provide
    ##        with the MOD
    ##
    ##   ????-??-?? - Version 0.9.1
    ##      - removed a wrong find tag in the how-to
    ##
    ##   ????-??-?? - Version 0.9.0
    ##      - initial BETA release
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################
    #
    #-----[ COPY ]------------------------------------------------
    #
    copy no_copy_db_update.php to no_copy_db_update.php

    #
    # This MOD need a database update.
    # Then, as you must have now copied the no_copy_db_update.php file
    # in your phpBB root directory, run it with your navigator...
    # http://www.yourWebSite.xxx/phpbbRootDir/no_copy_db_update.php
    #
    # ...and then delete it from the phpBB root directory!!!
    #
    # Please, do it NOW! Before editing phpBB files by EM or manually!!!
    # Otherwise, you may have an error message during your next
    # connection.
    #

    #
    #-----[ OPEN ]------------------------------------------------
    #
    admin/admin_users.php

    #
    #-----[ FIND ]------------------------------------------------
    #
    $interests = ( !empty($HTTP_POST_VARS[interests]) ) ? trim(strip_tags( $HTTP_POST_VARS[interests] ) ) : ;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Start add - No copy MOD
    $user_extra = ( isset($HTTP_POST_VARS[user_extra]) ) ? 1 : 0;
    // End add - No copy MOD

    #
    #-----[ FIND ]------------------------------------------------
    #
                $sql = "UPDATE " . USERS_TABLE . "
                    SET

    #
    #-----[ IN-LINE FIND ]----------------------------------------
    #
    str_replace("", "", $interests) . "

    #
    #-----[ IN-LINE AFTER, ADD ]----------------------------------
    #

    , user_extra = $user_extra

    #
    #-----[ FIND ]------------------------------------------------
    #
    $interests = htmlspecialchars($this_userdata[user_interests]);

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Start add - No copy MOD
    $user_extra = $this_userdata[user_extra];
    // End add - No copy MOD

    #
    #-----[ FIND ]------------------------------------------------
    #
    $s_hidden_fields .= <input type="hidden" name="interests" value=" . str_replace(""", "&quot;", $interests) . " />;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Start add - No copy MOD
    $s_hidden_fields .= <input type="hidden" name="user_extra" value=" . $user_extra . " />;
    // End add - No copy MOD

    #
    #-----[ FIND ]------------------------------------------------
    #
                INTERESTS => $interests,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Start add - No copy MOD
    EXTRA_CHECKED => ($user_extra) ? checked="checked" : ,
    // End add - No copy MOD

    #
    #-----[ FIND ]------------------------------------------------
    #
    L_INTERESTS => $lang[Interests],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Start add - No copy MOD
    L_EXTRA => $lang[Extra_priv],
    L_EXTRA_EXPLAIN => $lang[Extra_priv_explain],
    // End add - No copy MOD

    #
    #-----[ OPEN ]------------------------------------------------
    #
    includes/page_header.php

    #
    #-----[ FIND ]------------------------------------------------
    #
    PRIVATE_MESSAGE_NEW_FLAG => $s_privmsg_new,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Start add - No copy MOD
    USER_EXTRA => ($userdata[user_extra]) ? 0 : 1,
    L_NO_CLICK => $lang[No_r_click],
    L_NO_COPY => $lang[No_copy],
    // End add - No copy MOD

    #
    #-----[ OPEN ]------------------------------------------------
    #
    language/lang_english/lang_admin.php

    #
    #-----[ FIND ]------------------------------------------------
    #
    ?>

    #
    #-----[ BEFORE, ADD ]-----------------------------------------
    #

    // Start add - No copy MOD
    $lang[Extra_priv] =Extra priveliges;
    $lang[Extra_priv_explain] =Allow user to copy and right click;
    // End add - No copy MOD

    #
    #-----[ OPEN ]------------------------------------------------
    #
    language/lang_english/lang_main.php

    #
    #-----[ FIND ]------------------------------------------------
    #
    ?>

    #
    #-----[ BEFORE, ADD ]-----------------------------------------
    #

    // Start add - No copy MOD
    $lang[No_r_click] = You can not right click on this site;
    $lang[No_copy] = You can not copy text on this site;
    // End add - No copy MOD

    #
    #-----[ OPEN ]------------------------------------------------
    #
    # Make sure to edit this file for every theme you use
    #
    templates/subSilver/overall_header.tpl

    #
    #-----[ FIND ]------------------------------------------------
    #
    <!-- END switch_enable_pm_popup -->

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    <!-- Start add - No copy MOD -->
    <script language="javascript"> <!--
    var previous_key ;

    function clickIE4(){
    if (event.button==2){
    alert({L_NO_CLICK});
    return false;
    }
    }

    function clickNS4(e){
    if (document.layers||document.getElementById&&!document.all){
    if (e.which==2||e.which==3){
    alert({L_NO_CLICK});
    return false;
    }
    }
    }

    if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS4;
    }
    else if (document.all&&!document.getElementById){
    document.onmousedown=clickIE4;
    }
    function handleKeyDown()
    {
        if (previous_key==17 )
        {
            switch (window.event.keyCode)
            {
                case 45 :
                case 46:
                case 67:
                case 88:
                    alert({L_NO_COPY});
                    event.keyCode=0;
                    previous_key=window.event.keyCode;
                    event.returnValue=false;
                    break;
            }
        } else if (previous_key==16)
        {
            switch (window.event.keyCode)
            {
                case 45 :
                case 46:
                    alert({L_NO_COPY}+window.event.keyCode);
                    event.keyCode=0;
                    previous_key=window.event.keyCode;
                    event.returnValue=false;
                    break;
            }
        }
        previous_key=window.event.keyCode;
    }
    function handleKeyUp()
    {
        previous_key=0;
    }

    if ( {USER_EXTRA} )
    {
    document.oncontextmenu=new Function("alert({L_NO_CLICK});return false")
    document.onkeyup = handleKeyUp;
    document.onkeydown = handleKeyDown;
    }
    //-->
    </script>
    <!-- End add - No copy MOD -->

    #
    #-----[ OPEN ]------------------------------------------------
    #
    # Make sure to edit this file for every theme you use
    #
    templates/subSilver/admin/user_edit_body.tpl

    #
    #-----[ FIND ]------------------------------------------------
    #
        <td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
    </tr>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    <!-- Start add - No copy MOD -->
        <tr>
          <td class="row1"><span class="gen">{L_EXTRA}?</span></td>
          <td class="row2">
            <input type="checkbox" name="user_extra" {EXTRA_CHECKED}>
            {L_EXTRA_EXPLAIN}</td>
        </tr>
    <!-- End add - No copy MOD -->

    #
    #-----[ SAVE/CLOSE ALL FILES ]--------------------------------
    #
    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  7. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : آيكون ارسال يا Post Icons
    ¤ شرح : در كنار تاپيك ارسالي آيكوني مي افزايد ( مانند VB )


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    دريافت :
    کد (Text):
    http://www.phpbbhacks.com/download/1861
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
    RAYMOON از این پست تشکر کرده است.
  8. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : سيستم امتيازدهي يا Loewen Enterprise Rate User MOD
    ¤ شرح : امكان امتياز دهي به تاپيك ها


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    دريافت :
    کد (Text):
    http://www.loewen.com.sg/bbs/viewtopic.php?t=518
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  9. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : نمايش وضعيت كاربر يا Show Online In View Topic
    ¤ شرح : در كنار پستهاي كاربر حضور يا عدم حضور وي را نمايش ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    ########################################################
    ## Mod Title:   Show Online In View Topic
    ## Mod Version: 2.0.0
    ## Author:      AJ Quick, (http://www.ajquick.com/)
    ##
    ## Description:  
    ## This mod will show the status of a user in viewtopic
    ## next to their post. Stating if they are online or not.
    ##
    ## This mod is for phpBB2 ver 2.0.X
    ##
    ## Portions of this script were inspired/written by
    ## other people. I can only claim partial credit.
    ##
    ## Installation Level:  Easy
    ## Installation Time:   1-2 Minutes
    ## Files To Edit:      2
    ##  viewtopic.php
    ##  /templates/SubSilver/Viewtopic_body.tpl
    ##
    ##########################################################
    ##
    ## Installation Notes:
    ##
    ## There is some customization that will need to be
    ## done in Viewtopic_body.tpl It is really up to you
    ## where you want it to be placed.
    ##
    ########################################################

    #
    #-----[ OPEN ]------------------------------------------
    #

    Viewtopic.php

    #
    #-----[ FIND ]------------------------------------------
    #

    u.user_allowavatar, u.user_allowsmile,

    #
    #-----[ ADD AFTER ]------------------------------------------
    #

    u.user_allow_viewonline, u.user_session_time,

    #
    #-----[ FIND ]------------------------------------------
    #

        //
        // Again this will be handled by the templating
        // code at some point
        //
        $row_color = ( !($i % 2) ) ? $theme[td_color1] : $theme[td_color2];
        $row_class = ( !($i % 2) ) ? $theme[td_class1] : $theme[td_class2];

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    //User Online Hack
    //By AJ Quick (http://www.ajquick.com/)
    if($postrow[$i][user_session_time] >= (time()-60)){
    if($postrow[$i][user_allow_viewonline]){
    $status = <b><a href="viewonline.php">Online!</a></b>;
    }else{
    $status = "Offline";
    }
    }else{
    $status = "Offline";
    }

    #
    #-----[ FIND ]------------------------------------------
    #

            POSTER_JOINED => $poster_joined,
            POSTER_POSTS => $poster_posts,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

            POSTER_STATUS => $status,

    #
    #-----[ OPEN ]------------------------------------------
    #

    templates/SubSilver/Viewtopic_body.tpl

    #
    #-----[ FIND: Something Similar ]------------------------------------------
    #

            <td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br /><br /><div align="center">{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}</div><br /><br /> {postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}</span></td>

    #
    #-----[ Somewhere... ADD ]------------------------------------------
    #

    Status: {postrow.POSTER_STATUS}

    # Thats It!
    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  10. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : تاپيك هاي ارسالي كاربر يا Topics a user has started
    ¤ شرح : نمايش تمامي تاپيك هايي كه توسط كاربر شروع شده است


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    ##############################################################
    ## MOD Title: Topics a user has started
    ## MOD Author: Manipe < [email protected] > (N/A) http://www.manipef1.com
    ## MOD Description: Shows the number of topics a user has started in the profile page just under total posts and also enables you
        to search for the topics that that user started. Additionally, it displays statistics about the number of topics, and also displays
        the number of topics that user started in the Memberlist.
    ## MOD Version: 1.5.0
    ##
    ## Installation Level: Easy
    ## Installation Time: ~ 10 Minutes
    ## Files To Edit:
    ##      includes/usercp_viewprofile.php
    ##      language/lang_english/lang_main.php
    ##      templates/subSilver/profile_view_body.tpl
    ##      search.php
    ##      memberlist.php
    ##      templates/subSilver/memberlist_body.tpl
    ##      index.php
    ##      templates/subSilver/index_body.tpl
    ##      viewtopic.php
    ##      templates/subSilver/viewtopic_body.tpl
    ##     
    ##
    ## Included Files:
    ##      update_to_1.1.3.txt
    ##      update_to_1.2.0.txt
    ##      update_to_1.3.2.txt
    ##      update_to_1.4.0.txt
    ##      update_to_1.5.0.txt
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##
    ##  When you find a AFTER, ADD-Statement, the Code has to be added after the last line quoted in the FIND-Statement.
    ##  When you find a BEFORE, ADD-Statement, the Code has to be added before the last line quoted in the FIND-Statement.
    ##  When you find a IN-LINE BEFORE, ADD-Statement, the Code has to be added before the last bit of code quoted in the IN-LINE FIND-Statement.
    ##
    ##  If you have installed Version 1.0.0 previously, please use update_to_1.1.3.txt to update to version 1.1.3.
    ##  If you have installed Version 1.1.3 previously, please use update_to_1.2.0.txt to update to version 1.2.0.
    ##  If you have installed Version 1.2.0 previously, please use update_to_1.3.2.txt to update to version 1.3.2.
    ##  If you have installed Version 1.3.2 previously, please use update_to_1.4.0.txt to update to version 1.4.0.
    ##  If you have installed Version 1.4.0 previously, please use update_to_1.5.0.txt to update to the most recent version.
    ## 
    ##############################################################
    ## MOD History:
    ##
    ##
    ##   2004-12-05 - Version 1.5.0
    ##      - Now shows the number of topics the user has started in viewtopic.php, just under the avatar, and post total.
    ##
    ##   2004-12-04 - Version 1.4.0
    ##      - Now shows the total amount of topics started on the homepage (index.php)
    ##
    ##   2004-11-29 - Version 1.3.2
    ##      - Changed the position of the topics started column in the memberlist
    ##
    ##   2004-11-27 - Version 1.3.1
    ##      - Forgot to modify the colspan at the bottom of the memberlist
    ##
    ##   2004-11-24 - Version 1.3.0
    ##      - Now shows in the memberlist the number of topics the user had started
    ##
    ##   2004-11-20 - Version 1.2.0
    ##      - Added statistics, showing the percentage of topics the user posted to the total topics, and the average topics per day.
    ##
    ##   2004-11-19 - Version 1.1.3
    ##      - Some more minor mistakes fixed
    ##
    ##   2004-11-13 - Version 1.1.2
    ##      - Fixed problem with dangerous retrieving of $user variable
    ##
    ##   2004-11-03 - Version 1.1.1
    ##      - Tried to fix problem with dangerous retrieving of $user variable
    ##
    ##   2004-10-28 - Version 1.1.0
    ##      - Added function to search for the topics started by the user
    ##
    ##   2004-10-23 - Version 1.0.0
    ##      - First version, seems to work fine.
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################
    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/usercp_viewprofile.php

    #
    #-----[ FIND ]------------------------------------------
    #
    $search = <a href=" . $temp_url . "> . $lang[Search_user_posts] . </a>;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
    $sql = "SELECT COUNT(*) as topic_count FROM " . TOPICS_TABLE . " WHERE topic_poster = " . $profiledata[user_id] . "";
    if ( !($result = $db->sql_query($sql)) )
    {
        message_die(GENERAL_ERROR, Could not obtain topics started information, , __LINE__, __FILE__, $sql);
    }
    $row = $db->sql_fetchrow($result);
    $topics_started =  ( $row[topic_count] ) ? $row[topic_count] : 0;
    $db->sql_freeresult($result);
    $sql = "SELECT COUNT(*) as total_topic_count FROM " . TOPICS_TABLE;
    if ( !($result = $db->sql_query($sql)) )
    {
        message_die(GENERAL_ERROR, Could not obtain topics started information, , __LINE__, __FILE__, $sql);
    }
    $row = $db->sql_fetchrow($result);
    $total_topics =  ( $row[total_topic_count] ) ? $row[total_topic_count] : 0;
    $topics_percentage = ( $total_topics ) ? min(100, ($topics_started / $total_topics) * 100) : 0;
    $topics_per_day = $topics_started / $memberdays;
    $db->sql_freeresult($result);
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
        YIM_IMG => $yim_img,
        YIM => $yim,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
        TOPICS_STARTED => $topics_started,
        L_TOPICS_STARTED => $lang[Topics_Started],
        L_SEARCH_USER_TOPICS => sprintf($lang[Search_user_topics], $profiledata[username]),
        U_SEARCH_USER_TOPICS => append_sid("search.$phpEx?search_id=usertopics&user=" . urlencode($profiledata[user_id])),
        TOPIC_DAY_STATS => sprintf($lang[User_topic_day_stats], $topics_per_day),
        TOPIC_PERCENT_STATS => sprintf($lang[User_topic_pct_stats], $topics_percentage),
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_main.php

    #
    #-----[ FIND ]------------------------------------------
    #
    //
    // Thats all, Folks!

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
    $lang[Topics_Started] = Topics started;
    $lang[Search_user_topics] = Find all topics started by %s; // Find all topics started by username
    $lang[User_topic_pct_stats] = %.2f%% of total; // 1.25% of total
    $lang[User_topic_day_stats] = %.2f topics per day; // 1.5 topics per day
    $lang[Memberlist_topics_started] = Topics;
    $lang[Total_topics_started_index] =  in <b>%d</b> topics;
    $lang[Topics_viewtopic] = Topics;
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/profile_view_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
            <tr>
              <td valign="middle" align="right" nowrap="nowrap"><span class="gen">{L_LOCATION}:&nbsp;</span></td>
              <td><b><span class="gen">{LOCATION}</span></b></td>
            </tr>

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
            <tr>
              <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_TOPICS_STARTED}:&nbsp;</span></td>
              <td><b><span class="gen">{TOPICS_STARTED}</span></b><br /><span class="genmedred">[{TOPIC_PERCENT_STATS} / {TOPIC_DAY_STATS}]</span> <br /><span class="genmed"><a href="{U_SEARCH_USER_TOPICS}" class="genmed">{L_SEARCH_USER_TOPICS}</a></span></td>
            </tr>

    #
    #-----[ OPEN ]------------------------------------------
    #
    search.php

    #
    #-----[ FIND ]------------------------------------------
    #
    #Note: full line is longer
        if ( $search_id == newposts || $search_id == egosearch || $search_id == unanswered

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    )

    #
    #-----[ IN-LINE BEFORE, ADD ]------------------------------------------
    #
     || $search_id == usertopics


    #
    #-----[ FIND ]------------------------------------------
    #
    #Note: full line is longer
            if ( $search_id == newposts || $search_id == egosearch

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    ( $search_author !=

    #
    #-----[ IN-LINE BEFORE, ADD ]------------------------------------------
    #
    $search_id == usertopics ||

    #
    #-----[ FIND ]------------------------------------------
    #
                    else
                    {
                        redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=newposts", true));
                    }

                    $show_results = topics;
                    $sort_by = 0;
                    $sort_dir = DESC;
                }



    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
                else if ( $search_id == usertopics )
                {
                    $user = ( !empty($HTTP_GET_VARS[user]) ) ? intval($HTTP_GET_VARS[user]) : 0;
                    $sql = "SELECT p.post_id
                        FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
                        WHERE t.topic_poster = " . $user . " AND
                        p.post_id = t.topic_first_post_id";

                    $show_results = topics;
                    $sort_by = 0;
                    $sort_dir = DESC;
                }
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    memberlist.php

    #
    #-----[ FIND ]------------------------------------------
    #
        L_PM => $lang[Private_Message],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
        L_TOPICS => $lang[Memberlist_topics_started],
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
            $search = <a href=" . $temp_url . "> . $lang[Search_user_posts] . </a>;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
            $sql2 = "SELECT COUNT(*) as topic_count FROM " . TOPICS_TABLE . " WHERE topic_poster = " . $user_id . "";
            if ( !($result2 = $db->sql_query($sql2)) )
            {
                message_die(GENERAL_ERROR, Could not obtain topics started information, , __LINE__, __FILE__, $sql);
            }
            $row2 = $db->sql_fetchrow($result2);
            $topics_started =  ( $row2[topic_count] ) ? $row2[topic_count] : 0;
            $db->sql_freeresult($result2);
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
                YIM => $yim,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
                TOPICS_STARTED => $topics_started,
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/memberlist_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
          <th class="thTop" nowrap="nowrap">{L_POSTS}</th>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
          <th class="thTop" nowrap="nowrap">{L_TOPICS}</th>

    #
    #-----[ FIND ]------------------------------------------
    #
          <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
          <td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.TOPICS_STARTED}</span></td>

    #
    #-----[ FIND ]------------------------------------------
    #
          <td class="catBottom" colspan="8" height="28">&nbsp;</td>

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
          <td class="catBottom" colspan="9" height="28">&nbsp;</td>

    #
    #-----[ OPEN ]------------------------------------------
    #
    index.php

    #
    #-----[ FIND ]------------------------------------------
    #
    $newest_user = $newest_userdata[username];
    $newest_uid = $newest_userdata[user_id];

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, by Manipe (Begin)
    $sql = "SELECT COUNT(*) as topic_count FROM " . TOPICS_TABLE;
    if ( !($result = $db->sql_query($sql)) )
    {
        message_die(GENERAL_ERROR, Could not obtain topics started information, , __LINE__, __FILE__, $sql);
    }
    $row = $db->sql_fetchrow($result);
    $total_topics =  ( $row[topic_count] ) ? $row[topic_count] : 0;
    $db->sql_freeresult($result);
    // Topics a user has started MOD, by Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
            TOTAL_POSTS => sprintf($l_total_post_s, $total_posts),

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #

    // Topics a user has started MOD, By Manipe (Begin)
            TOTAL_TOPICS => sprintf($lang[Total_topics_started_index], $total_topics),
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/index_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
    {TOTAL_POSTS}

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    {TOTAL_TOPICS}

    #
    #-----[ OPEN ]------------------------------------------
    #
    viewtopic.php

    #
    #-----[ FIND ]------------------------------------------
    #
        if ( $poster_id != ANONYMOUS )
        {

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
            $sql1 = "SELECT COUNT(*) AS topic_count FROM " . TOPICS_TABLE . " WHERE topic_poster = " . $postrow[$i][user_id] . "";
            if ( !($result1 = $db->sql_query($sql1)) )
            {
                message_die(GENERAL_ERROR, Could not obtain topics started information, , __LINE__, __FILE__, $sql);
            }
            $row1 = $db->sql_fetchrow($result1);
            $topics_started =  $lang[Topics_viewtopic] . :  . (( $row1[topic_count] ) ? $row1[topic_count] : 0);
            $db->sql_freeresult($result1);
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
            $yim = ;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
            $topics_started = ;
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ FIND ]------------------------------------------
    #
            POSTER_POSTS => $poster_posts,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    // Topics a user has started MOD, By Manipe (Begin)
            POSTER_TOPICS => $topics_started,
    // Topics a user has started MOD, By Manipe (End)

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/viewtopic_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
    {postrow.POSTER_POSTS}

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    <br />{postrow.POSTER_TOPICS}

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #

    # EoM
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
    RAYMOON از این پست تشکر کرده است.
  11. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : كاربران حاضر در انجمن ها يا Who is active in which forum - Index
    ¤ شرح : نمايش كاربراني كه در انجمن هاي مختلف حضور دارند


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    کد (Text):
    ##########################################################################################
    ##
    ## MOD Titel:    Who is active in which forum - Index
    ## MOD Version:  1.2.0
    ## Author:       Acid
    ##
    ## Description:  You can see which user is active in which forum.. on index.
    ##
    ## Files To Edit:  3
    ##                 index.php
    ##                 language/lang_english/lang_main.php
    ##                 templates/xxx/index_body.tpl
    ##
    ##########################################################################################
    ##
    ## Note:
    ## First always make a backup from the files that youre going to edit.
    ##
    ## I´ve just used some codes from page_header.php.
    ## See optional part at bottom of this file.
    ##
    ##########################################################################################
    ##
    ## Versions:
    ##
    ## v1.2.0 - rewritten (less queries)
    ## v1.0.3 - Junior Admins/Supermoderators will be displayed in their own color now
    ##    - forgot to delete some code
    ## v1.0.2 - fixed a typo
    ## v1.0.1 - just cleaned the code and added optional part
    ## v1.0.0 - Release
    ##
    ##########################################################################################
    #
    #-----[ OPEN ]------------------------------------------
    #
    # index.php
    #
    #-----[ FIND ]------------------------------------------
    #
            $forum_moderators[$row[forum_id]][] = <a href=" . append_sid("groupcp.$phpEx?" . POST_GROUPS_URL . "=" . $row[group_id]) . "> . $row[group_name] . </a>;
        }
        $db->sql_freeresult($result);

    #
    #-----[ BELOW ADD ]------------------------------------------
    #
        $sql_active = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip, f.forum_id
                      FROM ". USERS_TABLE ." u, ". SESSIONS_TABLE ." s, ". FORUMS_TABLE ." f
                      WHERE u.user_id = s.session_user_id AND s.session_time >= ". (time() - 300) ." AND s.session_page = f.forum_id
                      ORDER BY u.username ASC, s.session_ip ASC";
        if( !($result_active = $db->sql_query($sql_active)) )
        {
            message_die(GENERAL_ERROR, could not obtain user/online information., , __LINE__, __FILE__, $sql_active);
        }

        $userlist_ary = array();
        $userlist_visible = array();
        $prev_userid = 0;
        $prev_userip = $prev_sessionip = ;
        while( $active = $db->sql_fetchrow($result_active) )
        {
            if( $active[session_logged_in] )
            {
                if( $active[user_id] != $prev_userid )
                {
                    if( file_exists(@phpbb_realpath($phpbb_root_path .includes/functions_color_groups..$phpEx)) )
                    {
                        include_once($phpbb_root_path .includes/functions_color_groups..$phpEx);
                        $active[username] = color_group_colorize_name($active[user_id]);
                    }
                    else
                    {

                        if( file_exists(@phpbb_realpath($phpbb_root_path .includes/functions_jr_admin..$phpEx)) )
                        {
                            include_once($phpbb_root_path .includes/functions_jr_admin. . $phpEx);
                            $jr_admin_userdata = jr_admin_get_user_info($active[user_id]);
                        }

                        $style_color = ;
                        if( $active[user_level] == ADMIN )
                        {
                            $active[username] = <b>. $active[username] .</b>;
                            $style_color = style="color:#. $theme[fontcolor3] .";
                        }
                        else if( $active[user_id] == $jr_admin_userdata[user_id] || $active[user_level] == LESS_ADMIN )
                        {
                            $active[username] = <b>. $active[username] .</b>;
                            $style_color = style="color:#FF0000";
                        }
                        else if( $active[user_level] == MOD )
                        {
                            $active[username] = <b>. $active[username] .</b>;
                            $style_color = style="color:#. $theme[fontcolor2] .";
                        }
                    }

                    if( $active[user_allow_viewonline] )
                    {
                        $onlinerow[$active[forum_id]][] = <a href=". append_sid("profile.$phpEx?mode=viewprofile&amp;". POST_USERS_URL ."=". $active[user_id]) ." . $style_color .>. $active[username] .</a>;
                        $logged_visible_active[$active[forum_id]][]++;
                    }
                    else
                    {
                        $onlinerow[$active[forum_id]][] = ( $active[user_allow_viewonline] || $userdata[user_level] == ADMIN ) ? <a href=". append_sid("profile.$phpEx?mode=viewprofile&amp;". POST_USERS_URL ."=". $active[user_id]) ." . $style_color .><i>. $active[username] .</i></a> : ;
                        $logged_hidden_active[$active[forum_id]][]++;
                    }
                }
                $prev_userid = $active[user_id];
            }
            else
            {
                if( $active[session_ip] != $prev_sessionip )
                {
                    $guestrow[$active[forum_id]][] = ;
                    $guests_active[$active[forum_id]][]++;
                }
            }
            $prev_sessionip = $active[session_ip];
        }
        $db->sql_freeresult($result_active);

    #
    #-----[ FIND ]------------------------------------------
    #
                                $template->assign_block_vars(catrow.forumrow,   array(
                                    ROW_COLOR => # . $row_color,

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
                                if( count($onlinerow[$forum_id]) > 0 )
                                {
                                    $users_total_guests = count($guests_active[$forum_id]);
                                    $l_guests_total = ( $users_total_guests != 0 ) ? (( $users_total_guests == 1 ) ? $lang[Forum_one_guest_active] : $lang[Forum_more_guests_active]) : ;
                                }
                                else
                                {
                                    $users_total_guests = &nbsp;;
                                    $l_guests_total = ;
                                }

                                if( count($onlinerow[$forum_id]) > 0 )
                                {
                                    $users_total = count($onlinerow[$forum_id]);
                                    $users_total_hidden = count($logged_hidden_active[$forum_id]);
                                    $users_active = implode(, , $onlinerow[$forum_id]);

                                    $l_active_total = ( $users_total == 1 ) ? $lang[Forum_one_active] : $lang[Forum_more_active];
                                    $l_hidden_total = ( ($users_total_hidden != 0 ) ? ( $userdata[user_level] == ADMIN ) ?  : (( $users_total_hidden == 1 ) ? $lang[Forum_one_hidden_active] : $lang[Forum_more_hidden_active]) : );
                                }
                                else
                                {
                                    $users_total = &nbsp;;
                                    $users_total_hidden = &nbsp;;
                                    $users_active = &nbsp;;

                                    $l_active_total = $lang[Forum_no_active];
                                    $l_hidden_total = ;
                                }

                                $template->assign_block_vars(catrow.forumrow,   array(
                                    ACTIVE => $users_active,
                                    ACTIVE_TOTAL => sprintf($l_active_total, ($users_total+$users_total_guests)),
                                    ACTIVE_INFO => sprintf($l_hidden_total, $users_total_hidden).sprintf($l_guests_total, $users_total_guests),


    #
    #-----[ OPEM ]------------------------------------------
    #
    # language/lang_english/lang_main.php
    #
    #-----[ FIND ]------------------------------------------
    #
    $lang[Moderators] = Moderators;

    #
    #-----[ BELOW ADD ]------------------------------------------
    #
    // if you don´t want to display "0 users" uncomment the following line
    // and put the slashes before the second line
    // $lang[Forum_no_active] = ;
    $lang[Forum_no_active] = <b>0</b> Users active; // <-- this one
    $lang[Forum_one_active] = <b>%d</b> User active: ;
    $lang[Forum_more_active] = <b>%d</b> Users active: ;
    $lang[Forum_one_hidden_active] = <b>%d</b> Hidden;
    $lang[Forum_more_hidden_active] = <b>%d</b> Hidden;
    $lang[Forum_one_guest_active] = <b>%d</b> Guest;
    $lang[Forum_more_guests_active] = <b>%d</b> Guests;


    #
    #-----[ OPEN ]------------------------------------------
    #
    # templates/xxx/index_body.tpl
    #
    #-----[ FIND ]------------------------------------------
    #
      </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span></td>

    #
    #-----[ REPLACE WITH ]------------------------------------------
    # if you can´t find the mentioned line (maybe you´re using a different template) just
    # search for a part of it

      </span><span class="gensmall">{catrow.forumrow.L_MODERATOR} {catrow.forumrow.MODERATORS}</span><br />
      <span class="gensmall">{catrow.forumrow.ACTIVE_TOTAL} {catrow.forumrow.ACTIVE} {catrow.forumrow.ACTIVE_INFO}</span></td>

    ##########################################################################################
    #
    #-----[ OPTIONAL PART ]---------------------------------------------
    #
    # if you have the "Junior Admin" or "Supermoderator" mod installed and want to
    # change the displayed color
    #
    #-----[ FIND (index.php) ]------------------------------------------
    #
    # replace #FF0000 with the current color

        else if( $active[user_id] == $jr_admin_userdata[user_id] || $active[user_level] == LESS_ADMIN )
        {
            $active[username] = <b>. $active[username] .</b>;
            $style_color = style="color:#FF0000";
        }

    #
    #-------------------------------------------------------------------
    #
    # if you want to enable the activities information only for admins
    #
    #-----[ FIND (index.php) ]------------------------------------------
    #
                if( count($onlinerow[$forum_id]) > 0 )

    #
    #-----[ REPLACE WITH ]----------------------------------------------
    #
                if( count($onlinerow[$forum_id]) > 0 && $userdata[user_level] == ADMIN )

    #
    #-------------------------------------------------------------------
    #
    # if you want to enable the current activities information only
    # for the moderators of the current forums
    #
    #-----[ FIND (index.php) ]------------------------------------------
    #
                if( count($onlinerow[$forum_id]) > 0 )

    #
    #-----[ REPLACE WITH ]----------------------------------------------
    #
                $is_auth = array();
                $is_auth = auth(AUTH_ALL, $forum_id, $userdata, $forum_topic_data);
                if( count($onlinerow[$forum_id]) > 0 && $is_auth[auth_mod] )

    ##########################################################################################
    ##########################################################################################
    ##########################################################################################
     
    نوشته شده توسط Hyper در ‏16 سپتامبر 2005
  12. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : عدم امكان انتخاب زبان يا Hide_Language_Select
    ¤ شرح : امكان انتخاب زبان ديگري غير از زبان جاري را غير ممكن ميسازد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    كد :
    کد (Text):
    ##############################################################
    ## MOD Title: Hide_Language_Select
    ## MOD Author: Falstaff < [email protected] > (David Falstaff) http://www.falstaffenterprises.com
    ## MOD Description: Adds the option to override the users language choice in the
    ##                  General Configuration panel, and if override is set to yes
    ##                  hides the language drop-down in the users profile to avoid confusion.
    ## MOD Version: 1.0.1
    ##
    ## Installation Level: (Easy)
    ## Installation Time: ~5 Minutes
    ## Files To Edit: admin/admin_board.php
    ##                templates/subSilver/profile_add_body.tpl
    ##                templates/subSilver/admin/board_config_body.tpl
    ##                language/lang_english/lang_admin.php
    ##                includes/usercp_register.php
    ## Included Files: (n/a)
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2005-02-18 - Version 1.0.1
    ##      - corrected to control registration form also
    ##
    ##   2004-09-28 - Version 1.0.0
    ##      - Initial Release
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################

    #
    #-----[ SQL ]------------------------------------------
    #

    INSERT INTO phpbb_config (config_name, config_value) VALUES (override_language, 0);

    #
    #-----[ OPEN ]------------------------------------------
    #

    admin/admin_board.php

    #
    #-----[ FIND ]------------------------------------------
    #

    $lang_select = language_select($new[default_lang], default_lang, "language");


    #
    #-----[ AFTER, ADD ]------------------------------------
    #

    $override_language_yes = ( $new[override_language] ) ? "checked="checked"" : "";
    $override_language_no = ( !$new[override_language] ) ? "checked="checked"" : "";

    #
    #-----[ FIND ]------------------------------------------
    #

      "L_RESET" => $lang[Reset],

    #
    #-----[ AFTER, ADD ]------------------------------------
    #

      //Begin Hide Language Select MOD
      "L_OVERRIDE_LANGUAGE" => $lang[override_user_language] ,
      "L_OVERRIDE_LANGUAGE_EXPLAIN" => $lang[override_user_language_explain],
      "OVERRIDE_LANGUAGE_YES" => $override_language_yes,
      "OVERRIDE_LANGUAGE_NO" => $override_language_no,
      //End Hide Language Select MOD

    #
    #-----[ OPEN ]-------------------------------------------
    #

    templates/subSilver/profile_add_body.tpl

    #
    #-----[ FIND ]-------------------------------------------
    #

      <tr>
        <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
        <td class="row2"><span class="gensmall">{LANGUAGE_SELECT}</span></td>
      </tr>

    #
    #-----[ REPLACE WITH ]-----------------------------------
    #

      <!-- BEGIN override_user_language_block -->
      <tr>
        <td class="row1"><span class="gen">{L_BOARD_LANGUAGE}:</span></td>
        <td class="row2"><span class="gensmall">{LANGUAGE_SELECT}</span></td>
      </tr>
      <!-- END override_user_language_block -->

    #
    #-----[ OPEN ]------------------------------------------
    #

    templates/subSilver/admin/board_config_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #

      <tr>
        <td class="row1">{L_DEFAULT_LANGUAGE}</td>
        <td class="row2">{LANG_SELECT}</td>
      </tr>

    #
    #-----[ AFTER, ADD ]------------------------------------
    #

      <!-- Begin Hide Language Select -->
      <tr>
        <td class="row1">{L_OVERRIDE_LANGUAGE}<br /><span class="gensmall">{L_OVERRIDE_LANGUAGE_EXPLAIN}</span></td>
        <td class="row2"><input type="radio" name="override_language" value="1" {OVERRIDE_LANGUAGE_YES} /> {L_YES}&nbsp;&nbsp;<input type="radio" name="override_language" value="0" {OVERRIDE_LANGUAGE_NO} /> {L_NO}</td>
      </tr>
      <!-- End Hide Language Select -->

    #
    #-----[ OPEN ]------------------------------------------
    #

    language/lang_english/lang_admin.php

    #
    #-----[ FIND ]------------------------------------------
    #

    //
    // Thats all Folks!

    #
    #-----[ AFTER, ADD ]-----------------------------------
    #

    //Begin Hide Language Select MOD
    $lang[override_user_language] = Override user language;
    $lang[override_user_language_explain] = Hides language choice drop-down in users profile;
    //End Hide Language Select MOD

    #
    #-----[ OPEN ]----------------------------------------------
    #

    includes/usercp_register.php

    #
    #-----[ FIND ]----------------------------------------------
    #

      }

      $template->pparse(body);

      include($phpbb_root_path . includes/page_tail..$phpEx);

      ?>

    #
    #-----[ BEFORE, ADD ]----------------------------------------------
    #

          //Begin Hide Language Select MOD
          if ($board_config[override_language])
          {
          }
          else
          {
            $template->assign_block_vars(override_user_language_block, array());
          }
          //End Hide Language Select MOD

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
    RAYMOON از این پست تشکر کرده است.
  13. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : كنترل آيكون انجمن ها يا Forum Icon with ACP Control
    ¤ شرح : در كنار هر انجمن آيكني را نمايش ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    كد :
    کد (Text):

    ########################################################
    ## MOD Title:    Forum Icon with ACP Control (Default)
    ## MOD Version:    1.0.4
    ## MOD Author:    Mac (Y.C. LIN) < [email protected] > http://endless-tw.net
    ##
    ## MOD Description:  This mod allow admin to give each forum a icon in the ACP
    ##      Icons will show on index
    ##
    ## Installation Level:  Easy
    ## Installation Time:  3 Minutes
    ##
    ## Files To Edit:  8
    ##  index.php
    ##  viewforum.php
    ##  admin/admin_forums.php
    ##  language/lang_english/lang_admin.php
    ##  templates/subSilver/admin/forum_admin_body.tpl
    ##  templates/subSilver/admin/forum_edit_body.tpl
    ##  templates/subSilver/index_body.tpl
    ##  templates/subSilver/viewforum_body.tpl
    ##
    ## Included Files:   n/a
    ##
    #################################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##  Set your forum icon image paths as those rank images
    ##
    ##  If you wish to using the LIST BOX option,
    ##  you have to follow the instruction in EXTRA folder. Please DO NOT using the below code!
    ##  Both options CANNOT be used together.
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2003-11-04 - Version 1.0.0
    ##      - Initial Release
    ##
    ##   2003-11-08 - Version 1.0.1
    ##      - Checked for 2.0.6 competibility, no change in coding
    ##
    ##   2003-11-15 - Version 1.0.2
    ##      - Corrections were made for phpBB MOD Database submission
    ##
    ##   2003-12-01 - Version 1.0.3
    ##      - Forum icon selectable using list box (Option 2)
    ##  - Add forum icon image to Forum Administration main panel
    ##  - Add forum icon image to corresponding the viewforum.php
    ##
    ##   2004-02-11 - Version 1.0.4
    ##      - Fix ListBox no-picture problem when icon is slected for the first time
    ##    People using the default option DOES NOT need to upgrade
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################
    #
    #-----[ SQL ]------------------------------------------
    #
    # Remember to change the table prefix used on your database
    ALTER TABLE `phpbb2_forums` ADD `forum_icon` VARCHAR( 255 ) default NULL;

    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_admin.php

    #
    #-----[ FIND ]------------------------------------------
    #
    $lang[Forum_status] = Forum status;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $lang[Forum_icon] = Forum icon; // Forum Icon MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    admin/admin_forums.php

    #
    #-----[ FIND ]------------------------------------------
    #
            $forumstatus = $row[forum_status];


    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            $forumicon = $row[forum_icon]; // Forum Icon MOD

    #
    #-----[ FIND ]------------------------------------------
    #
            $forumstatus = FORUM_UNLOCKED;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            $forumicon = ; // Forum Icon MOD

    #
    #-----[ FIND ]------------------------------------------
    #
            L_FORUM_STATUS => $lang[Forum_status],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            L_FORUM_ICON => $lang[Forum_icon], // Forum Icon MOD

    #
    #-----[ FIND ]------------------------------------------
    #
            DESCRIPTION => $forumdesc)

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
            DESCRIPTION => $forumdesc,
            ICON => ( $forumicon ) ? $forumicon : , // Forum Icon MOD
            ICON_DISPLAY => ( $forumicon ) ? <img src=" . $phpbb_root_path . $forumicon . " /> :  // Forum Icon MOD
            )

    #
    #-----[ FIND ]------------------------------------------
    #
          // There is no problem having duplicate forum names so we wont check for it.
          $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    forum_status

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    , forum_icon

    #
    #-----[ FIND ]------------------------------------------
    #
            VALUES (" . $next_id . ", " . str_replace("", "", $HTTP_POST_VARS[forumname]) . ", " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", " . str_replace("", "", $HTTP_POST_VARS[forumdesc]) . ", $next_order, " . intval($HTTP_POST_VARS[forumstatus]) . ", " . intval($HTTP_POST_VARS[prune_enable]) . $value_sql . ")";

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    , " . intval($HTTP_POST_VARS[forumstatus]) . "

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    , " . str_replace("", "", $HTTP_POST_VARS[forumicon]) . "

    #
    #-----[ FIND ]------------------------------------------
    #
          $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = " . str_replace("", "", $HTTP_POST_VARS[forumname]) . ", cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = " . str_replace("", "", $HTTP_POST_VARS[forumdesc]) . ", forum_status = " . intval($HTTP_POST_VARS[forumstatus]) . ", prune_enable = " . intval($HTTP_POST_VARS[prune_enable]) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);
    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    , forum_status = " . intval($HTTP_POST_VARS[forumstatus]) . "

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    , forum_icon = " . str_replace("", "", $HTTP_POST_VARS[forumicon]) . "

    #
    #-----[ FIND ]------------------------------------------
    #
              FORUM_DESC => $forum_rows[$j][forum_desc],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
              FORUM_ICON_IMG => ( $forum_rows[$j][forum_icon] ) ? <img src=" . $phpbb_root_path . $forum_rows[$j][forum_icon] . " alt=".$forum_data[$j][forum_name]." title=".$forum_data[$j][forum_name]." /> : , // Forum Icon Mod

    #
    #-----[ OPEN ]------------------------------------------
    #
    index.php

    #
    #-----[ FIND ]------------------------------------------
    #
                  $posts = $forum_data[$j][forum_posts];
                  $topics = $forum_data[$j][forum_topics];

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
                  $icon = $forum_data[$j][forum_icon];  // Forum Icon Mod

    #
    #-----[ FIND ]------------------------------------------
    #
                    FORUM_FOLDER_IMG => $folder_image,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
                    FORUM_ICON_IMG => ($icon) ? <img src=" . $phpbb_root_path . $icon . " alt=".$forum_data[$j][forum_name]." title=".$forum_data[$j][forum_name]." /> : ,  // Forum Icon Mod

    #
    #-----[ OPEN ]------------------------------------------
    #
    viewforum.php

    #
    #-----[ FIND ]------------------------------------------
    #
      FORUM_NAME => $forum_row[forum_name],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
      FORUM_ICON_IMG => ($forum_row[forum_icon]) ? <img src=" . $phpbb_root_path . $forum_row[forum_icon] . " alt=".$forum_row[forum_name]." title=".$forum_row[forum_name]." />&nbsp; : ,  // Forum Icon Mod Icon Mod

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/forum_edit_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
      <tr>
        <td class="row1">{L_FORUM_NAME}</td>
        <td class="row2"><input type="text" size="25" name="forumname" value="{FORUM_NAME}" class="post" /></td>
      </tr>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
      <tr>
        <td class="row1">{L_FORUM_ICON}</td>
        <td class="row2"><input type="text" size="35" name="forumicon" value="{ICON}" class="post" />&nbsp;&nbsp;&nbsp;{ICON_DISPLAY}</td>
      </tr>

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/forum_admin_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
        <td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
        <td class="row2"><span class="gen">

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    {catrow.forumrow.FORUM_ICON_IMG}&nbsp;&nbsp;

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/index_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
      <th colspan="2" class="thCornerL" height="25" nowrap="nowrap">&nbsp;{L_FORUM}&nbsp;</th>

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    colspan="2"

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    colspan="3"

    #
    #-----[ FIND ]------------------------------------------
    #
      <td class="catLeft" colspan="2" height="28"><span class="cattitle"><a href="{catrow.U_VIEWCAT}" class="cattitle">{catrow.CAT_DESC}</a></span></td>

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    colspan="2"

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    colspan="3"

    #
    #-----[ FIND ]------------------------------------------
    #
      <td class="row1" align="center" valign="middle" height="50"><img src="{catrow.forumrow.FORUM_FOLDER_IMG}" width="46" height="25" alt="{catrow.forumrow.L_FORUM_FOLDER_ALT}" title="{catrow.forumrow.L_FORUM_FOLDER_ALT}" /></td>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
      <td class="row1" align="center" valign="middle" height="50">{catrow.forumrow.FORUM_ICON_IMG}</td>

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/viewforum_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
        <td align="left" valign="bottom" colspan="2"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a>

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
        <td align="left" valign="bottom" colspan="2">

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    {FORUM_ICON_IMG}

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #

    # EoM
     
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
    RAYMOON از این پست تشکر کرده است.
  14. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : اطلاعاتي در مورد آخرين ارسال يا Last post info
    ¤ شرح : در قسمت كاربران آنلاين اطلاعاتي در مورد آخرين مطلب ارسال شده در انجمن ها نمايش ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    كد :
    کد (Text):

    ##############################################################
    ## MOD Title: Last post info
    ## MOD Author: fredol < [email protected] > (fredol) http://phpbb.lovewithsmg.com/
    ## MOD Description: Add "Last post made by user on date/time" in whos online stats
    ## MOD Version: 1.0.5
    ##
    ## Installation Level: Easy
    ## Installation Time: 1 Minute
    ## Files To Edit:  index.php
    ##      templates/subSilver/index_body.tpl
    ##      language/lang_english/lang_main.php
    ## Included Files:  n/a
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##  the Get Viewable Forums part was made by zparta on one of his MOD, so thanks man! ;)
    ##############################################################
    ## MOD History:
    ##
    ##   2004-11-22 - Version 1.0.5
    ##  - Major speed improvements thanks to CADTutor, thanks again :)
    ##
    ##   2004-11-02 - Version 1.0.4
    ##  - Got sid back in place ;) but still working with #post
    ##
    ##   2004-10-29 - Version 1.0.3
    ##  - Removed getting $auth since it had already been done, should improve speed ;)
    ##  - Removed use of append_sid() to get #post working all the time
    ##
    ##   2004-09-03 - Version 1.0.2
    ##  - Added post title, which is now the link
    ##  - Fix: now shows the name for guests when available (and if not then Anonymous)
    ##
    ##   2004-07-02 - Version 1.0.1
    ##  - Fix: little bug if no post was made
    ##  - Fix: little bug if a guest (non-registered user) had made the last post
    ##
    ##   2004-06-30 - Version 1.0.0
    ##  - Submitted to the MOD-DB (no changes were made)
    ##
    ##   2004-06-02 - Version 0.0.2
    ##      - add link to the post (thanks CTCNetwork)
    ##
    ##   2004-06-02 - Version 0.0.1
    ##      - first version
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################

    #
    #-----[ OPEN ]-----
    #
    index.php
    #
    #-----[ FIND ]-----
    #
      //
      // Start output of page
      //
    #
    #-----[ BEFORE, ADD ]-----
    #
      //BEGIN-MOD:Last post info
      // Get Viewable Forums - made by zparta
      if ( function_exists(get_auth_keys) ) {
        $keys = array();
        $keys = get_auth_keys(Root);
        $auth_view_forum_sql = ;
        for ($i=0; $i < count($keys[id]); $i++)
        {
          if ($tree[type][ $keys[idx][$i] ] == POST_FORUM_URL)
          {
            $auth_view_forum_sql .= (($auth_view_forum_sql != ) ? ,  : ) . $tree[id][ $keys[idx][$i] ];
          }
        }
        $auth_view_forum_sql = ($auth_view_forum_sql ==  ? (0) : ( . $auth_view_forum_sql . ));
      }
      else
      {
        $auth_view_forum_sql = ;
        for($i = 0; $i < $total_categories; $i++)
        {
          $cat_id = $category_rows[$i][cat_id];
          $display_forums = false;
          for($j = 0; $j < $total_forums; $j++)
          {
            if ( $is_auth_ary[$forum_data[$j][forum_id]][auth_view] && $forum_data[$j][cat_id] == $cat_id )
            {
              $display_forums = true;
              $auth_view_forum_sql .= ($auth_view_forum_sql ==  ?  : ,  ) . $forum_data[$j][forum_id];
            }
          }
        }
        $auth_view_forum_sql = ($auth_view_forum_sql ==  ? (0) : ( . $auth_view_forum_sql . ));
      }
      $sql = "SELECT p.post_id, p.post_username, pt.post_subject, p.post_time, u.user_id, u.username, t.topic_title
        FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt, " . TOPICS_TABLE . " t
        WHERE p.forum_id IN " . $auth_view_forum_sql . " AND p.poster_id = u.user_id
        AND pt.post_id = p.post_id AND t.topic_id = p.topic_id
        ORDER BY p.post_time DESC LIMIT 1";

      if ( !($result = $db->sql_query($sql)) )
      {
        message_die(GENERAL_ERROR, Could not query last post informations, , __LINE__, __FILE__, $sql);
      }

      if ($row = $db->sql_fetchrowset($result))
      {
        $db->sql_freeresult($result);
        $append_sid = ( !empty($SID) && !preg_match(#sid=#, $url) ) ? $SID . & : ;
        if ($row[0][user_id]>-1)
        {
          $last_post_info = sprintf($lang[last_post_info], <a href="profile..$phpEx.?.$append_sid.mode=viewprofile& . POST_USERS_URL . = . $row[0][user_id] . ">, $row[0][username], </a>, create_date($board_config[default_dateformat], $row[0][post_time], $board_config[board_timezone]), <a href="viewtopic..$phpEx.?.$append_sid. POST_POST_URL . = . $row[0][post_id] . # . $row[0][post_id] . ">, ( (empty($row[0][post_subject])) ? Re:  . $row[0][topic_title] : $row[0][post_subject] ), </a>);
        }
        else
        {
          $last_post_info = sprintf($lang[last_post_info], , ( (empty($row[0][post_username])) ? $row[0][username] : $row[0][post_username] ), , create_date($board_config[default_dateformat], $row[0][post_time], $board_config[board_timezone]), <a href="viewtopic..$phpEx.?.$append_sid . POST_POST_URL . = . $row[0][post_id] . # . $row[0][post_id] . ">, ( (empty($row[0][post_subject])) ? Re:  . $row[0][topic_title] : $row[0][post_subject] ), </a>);
        }
      }
      else
      {
        $last_post_info = ;
      }

      //END-MOD:Last post info

    #
    #-----[ FIND ]-----
    #
      $template->assign_vars(array(
        TOTAL_POSTS => sprintf($l_total_post_s, $total_posts),
        TOTAL_USERS => sprintf($l_total_user_s, $total_users),
    #
    #-----[ BEFORE, ADD ]-----
    #
      //MODIF-MOD:Last post info, add: LAST_POST
    #
    #-----[ FIND ]-----
    #
        NEWEST_USER => sprintf($lang[Newest_user], <a href=" . append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$newest_uid") . ">, $newest_user, </a>),
    #
    #-----[ AFTER, ADD ]-----
    #
        LAST_POST => $last_post_info,
    #
    #-----[ OPEN ]-----
    #
    templates/subSilver/index_body.tpl
    #
    #-----[ FIND ]-----
    #
      <td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
    #
    #-----[ IN-LINE FIND ]-----
    #
      {TOTAL_POSTS}
    #
    #-----[ IN-LINE AFTER, ADD ]-----
    #
    , {LAST_POST}
    #
    #-----[ OPEN ]-----
    #
    language/lang_english/lang_main.php
    #
    #-----[ FIND ]-----
    #
    $lang[Newest_user] = The newest registered user is <b>%s%s%s</b>; // a href, username, /a
    #
    #-----[ AFTER, ADD ]-----
    #
    $lang[last_post_info] = Last post by <b>%s%s%s</b> on %s: %s%s%s; // a href, usernname, /a, post_time, a href, subject/title, /a
    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
    aquaquest از این پست تشکر کرده است.
  15. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : موضوعات مرتبط يا Related topics
    ¤ شرح : نمايش موضوعات مرتبط با موضوع ارسال شده


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    دريافت :
    کد (Text):

    http://www.phpbbhacks.com/download/2237
     
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
    RAYMOON و aquaquest از این پست تشکر کرده اند.
  16. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : تغيير رنگ عنوان تاپيك يا Colorize Forumtitle
    ¤ شرح : به ادمين امكان تغيير رنگ تاپيك را ميدهد


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    كد :
    کد (Text):

    ##############################################################
    ## MOD Title:    Colorize Forumtitle
    ## MOD Author: OXPUS < [email protected] > (Karsten Ude) http://www.oxpus.de
    ## MOD Description:  Gives admins the possibility to enter a color seperatly for each forumtitle.
    ## MOD Version:    1.0.0
    ##
    ## Installation Level:  Easy
    ## Installation Time:  3-5 Minutes
    ## Files To Edit:  7
    ##      index.php
    ##      admin/admin_forums.php
    ##      language/lang_english/lang_admin.php
    ##      language/lang_german/lang_admin.php
    ##      templates/subSilver/index_body.tpl
    ##      templates/subSilver/admin/forum_admin_body.tpl
    ##      templates/subSilver/admin/forum_edit_body.tpl
    ##
    ## Included Files:  n/a
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    ##############################################################
    ## Author Notes:
    ##
    ## Instead entering the given SQL-Statement, you can upload the file db_update.php
    ## to your phpbb root directory and run this with your browser.
    ## This file will do all nessassary changes in the database for you.
    ## After using this file, please delete it to avoid errors.
    ##
    ## If you have installed the Categories Hierarchy Mod, ONLY install the add-on!
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2004-05-12 - Version 1.0.0
    ##      - First release
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################

    #
    #-----[ SQL ]------------------------------------------
    #
    ALTER TABLE phpbb_forums ADD COLUMN forum_color varchar(6) DEFAULT  NOT NULL;

    #
    #-----[ OPEN ]------------------------------------------
    #
    index.php

    #
    #-----[ FIND ]------------------------------------------
    #
                    FORUM_NAME => $forum_data[$j][forum_name],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
                    FORUM_COLOR => ( $forum_data[$j][forum_color] !=  ) ? style="color: #.$forum_data[$j][forum_color]." : ,

    #
    #-----[ OPEN ]------------------------------------------
    #
    admin/admin_forums.php

    #
    #-----[ FIND ]------------------------------------------
    #
            $forumdesc = $row[forum_desc];
            $forumstatus = $row[forum_status];

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            $forum_color = $row[forum_color];

    #
    #-----[ FIND ]------------------------------------------
    #
            $forumdesc = ;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            $forum_color = ;

    #
    #-----[ FIND ]------------------------------------------
    #
          $forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected="selected"" : $forumunlocked = "selected="selected"";

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
          $forum_color = ( empty($forum_color) ) ?  : $forum_color;

    #
    #-----[ FIND ]------------------------------------------
    #
            L_FORUM_TITLE => $l_title,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            L_FORUM_COLOR => $lang[Forum_color],
            L_FORUM_COLOR_EXPLAIN => $lang[Forum_color_explain],

    #
    #-----[ FIND ]------------------------------------------
    #
            FORUM_NAME => $forumname,

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
            FORUM_COLOR => $forum_color,

    #
    #-----[ FIND ]------------------------------------------
    #
          $sql = "INSERT INTO " . FORUMS_TABLE . " (forum_id, forum_name, cat_id, forum_desc, forum_order, forum_status, prune_enable" . $field_sql . ")
            VALUES (" . $next_id . ", " . str_replace("", "", $HTTP_POST_VARS[forumname]) . ", " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", " . str_replace("", "", $HTTP_POST_VARS[forumdesc]) . ", $next_order, " . intval($HTTP_POST_VARS[forumstatus]) . ", " . intval($HTTP_POST_VARS[prune_enable]) . $value_sql . ")";

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    , forum_name

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , forum_color

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    " . str_replace("", "", $HTTP_POST_VARS[forumname]) . "

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , " . str_replace("", "", $HTTP_POST_VARS[forum_color]) . "

    #
    #-----[ FIND ]------------------------------------------
    #
          $sql = "UPDATE " . FORUMS_TABLE . "
            SET forum_name = " . str_replace("", "", $HTTP_POST_VARS[forumname]) . ", cat_id = " . intval($HTTP_POST_VARS[POST_CAT_URL]) . ", forum_desc = " . str_replace("", "", $HTTP_POST_VARS[forumdesc]) . ", forum_status = " . intval($HTTP_POST_VARS[forumstatus]) . ", prune_enable = " . intval($HTTP_POST_VARS[prune_enable]) . "
            WHERE forum_id = " . intval($HTTP_POST_VARS[POST_FORUM_URL]);

    #
    #-----[ IN-LINE FIND ]------------------------------------------
    #
    forum_name = " . str_replace("", "", $HTTP_POST_VARS[forumname]) . "

    #
    #-----[ IN-LINE AFTER, ADD ]------------------------------------------
    #
    , forum_color = " . str_replace("", "", $HTTP_POST_VARS[forum_color]) . "

    #
    #-----[ FIND ]------------------------------------------
    #
              FORUM_NAME => $forum_rows[$j][forum_name],

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
              FORUM_COLOR => ( $forum_rows[$j][forum_color] !=  ) ? style="color: #.$forum_rows[$j][forum_color]." : ,

    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_admin.php

    #
    #-----[ FIND ]------------------------------------------
    #
    $lang[Forum_edit_delete_explain] = The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $lang[Forum_color] = Set a color for the forum title;
    $lang[Forum_color_explain] = Leave this field blank to use the default color. Just enter the color number without leading #!;

    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_german/lang_admin.php

    #
    #-----[ FIND ]------------------------------------------
    #
    $lang[Forum_edit_delete_explain] = Hier kannst du alle allgemeinen Boardeinstellungen anpassen. Zur Benutzer- und Forenkonfiguration benutze bitte die entsprechenden Links auf der linken Seite;

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
    $lang[Forum_color] = Trage eine Farbe für den Forentitel ein.;
    $lang[Forum_color_explain] = Lass das Feld frei, um die Standardfarbe zu verwenden. Gib nur die Farbzahl ohne führende # ein!;

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/index_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
     <span class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
     <span {catrow.forumrow.FORUM_COLOR} class="forumlink"> <a href="{catrow.forumrow.U_VIEWFORUM}" {catrow.forumrow.FORUM_COLOR}  class="forumlink">{catrow.forumrow.FORUM_NAME}</a>

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/forum_admin_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
        <td class="row2"><span class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new">{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
        <td class="row2"><span {catrow.forumrow.FORUM_COLOR} class="gen"><a href="{catrow.forumrow.U_VIEWFORUM}" target="_new" {catrow.forumrow.FORUM_COLOR}>{catrow.forumrow.FORUM_NAME}</a></span><br /><span class="gensmall">{catrow.forumrow.FORUM_DESC}</span></td>

    #
    #-----[ OPEN ]------------------------------------------
    #
    templates/subSilver/admin/forum_edit_body.tpl

    #
    #-----[ FIND ]------------------------------------------
    #
      <tr>
        <td class="row1">{L_FORUM_STATUS}</td>
        <td class="row2"><select name="forumstatus">{S_STATUS_LIST}</select></td>
      </tr>

    #
    #-----[ AFTER, ADD ]------------------------------------------
    #
      <tr>
        <td class="row1" width="30%">{L_FORUM_COLOR}<br /><span class="gensmall">{L_FORUM_COLOR_EXPLAIN}</span></td>
        <td class="row2"><input type="text" size="10" maxlength="6" name="forum_color" value="{FORUM_COLOR}" class="post" /></td>
      </tr>


    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
    RAYMOON و aquaquest از این پست تشکر کرده اند.
  17. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : ضد ثبت نام روبوتيك يا Anti Robotic Register Flood
    ¤ شرح : از ثبت نام هاي روبوتيك جلوگيري ميكند


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    دريافت :
    کد (Text):

    http://www.phpbbhacks.com/download/560
     
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
  18. Hyper

    Hyper Active Member

    ارسال‌ها:
    1,478
    تشکر شده:
    287
    امتیاز دستاورد:
    36
    ¤ عنوان : تغيير اندازه آواتار يا Remote Avatar Resize
    ¤ شرح : اندازه غير مجاز آواتارها را اصلاح ميكند


    نكته مهم : پيش از ايجاد تغييرات لازم از فايل هاي مورد نياز نسخه پشتيبان تهيه كنيد ...


    كد :
    کد (Text):

    ##############################################################
    ## MOD Title: Remote Avatar Resize
    ## MOD Author: tomlevens < [email protected] > (Tom Levens) http://www.tomlevens.co.uk/
    ## MOD Description: A simple MOD to resize users remote avatar if it is larger than the maximum size set in the admin panel.
    ## MOD Version: 1.1.3
    ##
    ## Installation Level: Easy
    ## Installation Time: 5 Minutes
    ## Files To Edit: viewtopic.php
    ##                groupcp.php
    ##                memberlist.php
    ##                includes/usercp_viewprofile.php
    ##                includes/usercp_register.php
    ##                includes/functions.php
    ##                language/lang_english/lang_main.php
    ## Included Files: n/a
    ##############################################################
    ## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
    ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
    ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered
    ## in our MOD-Database, located at: http://www.phpbb.com/mods/
    #############################################################
    ## Author Notes:
    ##
    ## This is a simple MOD to resize the users remote avatar if it is larger than the
    ## maximum size set in the admin control panel. It does so through the size constraints
    ## in the HTML <img> tag.
    ##
    ## NOTE: It does not resize the actual image, just scales it in the HTML codes
    ##
    ##############################################################
    ## MOD History:
    ##
    ##   2004-01-26 - Version 1.0.0
    ##      - Initial Release
    ##
    ##   2004-01-26 - Version 1.0.1
    ##      - Fixed a small bug that caused PHP to report an error if the file link was dead
    ##
    ##   2004-08-10 - Version 1.1.0
    ##      - Complete rewrite, now uses a function to resize the image
    ##
    ##   2004-08-10 - Version 1.1.1
    ##      - Fixed an error in the .mod file syntax
    ##
    ##   2004-09-02 - Version 1.1.2
    ##      - Fixed a small bug that prevented display in memberlist.php
    ##
    ##   2004-09-09 - Version 1.1.2a
    ##      - Re-submitted to MOD database (no change from 1.1.2)
    ##
    ##   2004-09-15 - Version 1.1.3
    ##      - Added the resize to the edit profile page
    ##
    ##   2004-09-20 - Version 1.1.3a
    ##      - Re-submitted to MOD database (no change from 1.1.3)
    ##
    ##
    ##############################################################
    ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
    ##############################################################

    #
    #-----[ OPEN ]------------------------------------------
    #
    viewtopic.php

    #
    #-----[ FIND ]------------------------------------------
    #
             case USER_AVATAR_REMOTE:
                $poster_avatar = ( $board_config[allow_avatar_remote] ) ? <img src=" . $postrow[$i][user_avatar] . " alt="" border="0" /> : ;
                break;

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
             // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
             // (3 lines replaced - original lines follow)
             //
             //   case USER_AVATAR_REMOTE:
             //      $poster_avatar = ( $board_config[allow_avatar_remote] ) ? <img src=" . $postrow[$i][user_avatar] . " alt="" border="0" /> : ;
             //      break;
             //
             case USER_AVATAR_REMOTE:
                $poster_avatar = resize_avatar($postrow[$i][user_avatar]);
                break;
             //
             // END MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    groupcp.php

    #
    #-----[ FIND ]------------------------------------------
    #
             case USER_AVATAR_REMOTE:
                $poster_avatar = ( $board_config[allow_avatar_remote] ) ? <img src=" . $row[user_avatar] . " alt="" border="0" /> : ;
                break;

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
             // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
             // (3 lines replaced - original lines follow)
             //
             // case USER_AVATAR_REMOTE:
             //       $poster_avatar = ( $board_config[allow_avatar_remote] ) ? <img src=" . $row[user_avatar] . " alt="" border="0" /> : ;
             //       break;
             //
             case USER_AVATAR_REMOTE:
                $poster_avatar = resize_avatar($row[user_avatar]);
                break;
             //
             // END MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    memberlist.php

    #
    #-----[ FIND ]------------------------------------------
    #
                case USER_AVATAR_REMOTE:
                   $poster_avatar = ( $board_config[allow_avatar_remote] ) ? <img src=" . $row[user_avatar] . " alt="" border="0" /> : ;
                   break;

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
                // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
                // (3 lines replaced - original lines follow)
                //
                // case USER_AVATAR_REMOTE:
                //       $poster_avatar = ( $board_config[allow_avatar_remote] ) ? <img src=" . $row[user_avatar] . " alt="" border="0" /> : ;
                //       break;
                //
                case USER_AVATAR_REMOTE:
                   $poster_avatar = resize_avatar($row[user_avatar]);
                   break;
                //
                // END MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/usercp_viewprofile.php

    #
    #-----[ FIND ]------------------------------------------
    #
          case USER_AVATAR_REMOTE:
             $avatar_img = ( $board_config[allow_avatar_remote] ) ? <img src=" . $profiledata[user_avatar] . " alt="" border="0" /> : ;
             break;

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
          // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
          // (3 lines replaced - original lines follow)
          //
          // case USER_AVATAR_REMOTE:
          //    $avatar_img = ( $board_config[allow_avatar_remote] ) ? <img src=" . $profiledata[user_avatar] . " alt="" border="0" /> : ;
          //    break;
          //
          case USER_AVATAR_REMOTE:
             $avatar_img = resize_avatar($profiledata[user_avatar]);
             break;
          //
          // END MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/usercp_register.php

    #
    #-----[ FIND ]------------------------------------------
    #
             case USER_AVATAR_REMOTE:
                $avatar_img = ( $board_config[allow_avatar_remote] ) ? <img src=" . $user_avatar . " alt="" /> : ;
                break;

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
             // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
             // (3 lines replaced - original lines follow)
             //
             // case USER_AVATAR_REMOTE:
             //    $avatar_img = ( $board_config[allow_avatar_remote] ) ? <img src=" . $user_avatar . " alt="" /> : ;
             //    break;
             //
             case USER_AVATAR_REMOTE:
                $avatar_img = resize_avatar($user_avatar);
                break;
             //
             // END MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    includes/functions.php

    #
    #-----[ FIND ]------------------------------------------
    #
    ?>

    #
    #-----[ BEFORE, ADD ]------------------------------------------
    #
    // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
    // (30 lines added)
    //
    function resize_avatar($avatar_url) {
       global $board_config;

       list($avatar_width, $avatar_height) = @getimagesize($avatar_url);

       if($avatar_width > $board_config[avatar_max_width] && $avatar_height <= $board_config[avatar_max_height]) {
          $cons_width = $board_config[avatar_max_width];
          $cons_height = round((($board_config[avatar_max_width] * $avatar_height) / $avatar_width), 0);
       }
       elseif($avatar_width <= $board_config[avatar_max_width] && $avatar_height > $board_config[avatar_max_height]) {
          $cons_width = round((($board_config[avatar_max_height] * $avatar_width) / $avatar_height), 0);
          $cons_height = $board_config[avatar_max_height];
       }
       elseif($avatar_width > $board_config[avatar_max_width] && $avatar_height > $board_config[avatar_max_height]) {
          if($avatar_width >= $avatar_height) {
             $cons_width = $board_config[avatar_max_width];
             $cons_height = round((($board_config[avatar_max_width] * $avatar_height) / $avatar_width), 0);
          }
          elseif($avatar_width < $avatar_height) {
             $cons_width = round((($board_config[avatar_max_height] * $avatar_width) / $avatar_height), 0);
             $cons_height = $board_config[avatar_max_height];
          }
       }
       else {
          $cons_width = $avatar_width;
          $cons_height = $avatar_height;
       }

       return ( $board_config[allow_avatar_remote] ) ? <img src=" . $avatar_url . " width=" . $cons_width . " height=" . $cons_height . " alt="" border="0" /> : ;
    }
    //
    // END MOD

    #
    #-----[ OPEN ]------------------------------------------
    #
    language/lang_english/lang_main.php

    #
    #-----[ FIND ]------------------------------------------
    #
    # Full Line:
    #   $lang[Avatar_explain] = Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.;
    $lang[Avatar_explain] =

    #
    #-----[ REPLACE WITH ]------------------------------------------
    #
    // MOD: Remote Avatar Resize  - by tomlevens ([email protected])
    // (1 line replaced - original lines follow)
    //
    // $lang[Avatar_explain] = Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.;
    //
    $lang[Avatar_explain] = Displays a small graphic image below your details in posts. Only one image can be displayed at a time. The dimensions of the image are restricted to a maximum of %d pixels wide, and %d pixels high. Uploaded avatars have a file size limit of %d KB, and must be less than or equal to the maximum dimensions. Remotely hosted avatars will be automatically scaled to fit these dimensions.;
    //
    // END MOD

    #
    #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
    #
    # EoM
     
     
    نوشته شده توسط Hyper در ‏24 اکتبر 2005
    RAYMOON از این پست تشکر کرده است.
وضعیت موضوع:
موضوع بسته شده است.

به اشتراک بگذارید