Username:
Password:
 Log me on automatically each visit
 
Aeroion.Ru
Форумы сервера Aeroion.Ru
Welcome

Aeroion.Ru Forum Index
  » Технические форумы
   » Поддержка и моды для phpBB2
    » Мод Points System add-on: Edit User's Points
   изменение количества пойнтов администратором
printer-friendly view
AuthorМод Points System add-on: Edit User's Points
Sergey Gender:Male


Местный босс - администратор


Joined: 06 Jan 2005
Location: Оренбург
Posts: 1165
Last Visited: Yesterday at 14:46
Кредиты: 3714
Reputation: 48
Age: 41
Zodiac: Aquarius Pig

Описание мода: Мод позволяет напрямую изменять количество пойнтов пользователя через административный раздел редактирования профиля.
Мод требует наличия Points System mod версии 1.0.0. Для версии мода 2.0.0 не актуально
Версия: 1.0.0
Сложность установки: Легко
Время установки: ~5 минут

Code:
#################################################
## MOD Title: Points System add-on: Edit User's Points
## MOD Author: Sergey < garnitur356 at mail15.com > http://forum.aeroion.ru
## MOD Description: A simple MOD to allow the admin to edit a user's points through the admin panel.
##                    Requires Points System ver 1.0.0
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 2
##                admin/admin_users.php
##              templates/subSilver/admin/user_edit_body.tpl
## Included Files: n/a
##################################################
## For Security Purposes, Please Check: http://forum.aeroion.ru/forum1.html for the
## latest version of this MOD.
#################################################
## MOD History:
##
##   2005-11-07 - Version 1.0.0
##              - Initial Release
##
#################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################

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

#
#-----[ FIND ]------------------------------------------
#
        $user_allowpm = ( !empty($HTTP_POST_VARS['user_allowpm']) ) ? intval( $HTTP_POST_VARS['user_allowpm'] ) : 0;

#
#-----[ AFTER, ADD ]------------------------------------------
#
        // MOD: Edit User's Points
        //
        $user_points = ( !empty($HTTP_POST_VARS['user_points']) ) ? intval( $HTTP_POST_VARS['user_points'] ) : 0;
        //
        // END MOD

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

#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_allow_pm = $user_allowpm

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
, user_points = $user_points

#
#-----[ FIND ]------------------------------------------
#
        $user_allowpm = $this_userdata['user_allow_pm'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
        // MOD: Edit User's Points
        //
        $points = $this_userdata['user_points'];
        //
        // END MOD

#
#-----[ FIND ]------------------------------------------
#
             $s_hidden_fields .= '<input type="hidden" name="user_allowpm" value="' . $user_allowpm . '" />';

#
#-----[ AFTER, ADD ]------------------------------------------
#
             // MOD: Edit User's Points
             //
            $s_hidden_fields .= '<input type="hidden" name="user_points" value="' . $user_points . '" />';
            //
             // END MOD

#
#-----[ FIND ]------------------------------------------
#
            'RANK_SELECT_BOX' => $rank_select_box,

#
#-----[ AFTER, ADD ]------------------------------------------
#
             // MOD: Edit User's Points
             //
            'L_POINTS' => $board_config['points_name'],
            'POINTS' =>  $points,
            //
             // END MOD

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

#
#-----[ FIND ]------------------------------------------
#
#
# --- [NOTE: You will have to make this change to ALL themes you have ---
# ---        installed.  I use "subSilver" as an example.           ] ---
#
#
    <tr>
        <td class="row1"><span class="gen">{L_SELECT_RANK}</span></td>
        <td class="row2"><select name="user_rank">{RANK_SELECT_BOX}</select></td>
    </tr>

#
#-----[ AFTER, ADD ]------------------------------------------
#
    <tr>
        <td class="row1"><span class="gen">{L_POINTS}</span></td>
        <td class="row2"><input class="post" type="text" name="user_points" size="5" class="post" style="width: 50px" value="{POINTS}" /></td>
    </tr>

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


Download edit_user_points.mod (3.84 KB). Added/Updated Tue 15 Nov, 2005 07:12. Downloaded 51 Time(s).
редактирование количества пойнтов администратором (для версии 1.0.0)


_________________
Профессионал - это тот же дилетант, только знающий где ошибется. Генератор db_update.php для phpBB2 с некоторыми удобствами.
Как ставить моды. Что такое [SQL] и с чем его едят | Как правильно задавать вопросы и получать адекватные ответы | Правила форума
Бесплатная техподдержка только на форуме! Не надо стучаться в аську, слать емайлы, пытаться писать в приват. Спасибо за понимание.
Please do not PM, ICQ or email me for support help - you won't get any reply. If you have a question or issue, post it in the appropriate forum/topic. Thanks!
Back to topOffline View user's profile Skype Name
Display posts from previous:   

Summary Rating For >> Мод Points System add-on: Edit User's Points
Average Rating: 0.00 :: Min Rating: 0 :: Max Rating: 0 :: Number of Ratings: 0
Choose Rating: 1   2   3   4   5  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Мод Advanced Points System Russian 2.1.4
Система пойнтов (мод оплаты за сообще...
Sergey Поддержка и моды для phpBB2 65 Wed 16 Dec, 2009 14:51 View latest post
Begemot
No new posts Мод Points per download (File attachm...
скачивание файлов за пойнты
Sergey Поддержка и моды для phpBB2 42 Thu 14 May, 2009 19:23 View latest post
suende
No new posts Возможно ли объединить моды Points sy... smart2008 Поддержка и моды для phpBB2 1 Wed 20 Aug, 2008 10:46 View latest post
Sergey
No new posts Мод Points System ver 1.0.0
исправление глюков при редактировании...
Sergey Поддержка и моды для phpBB2 1 Tue 31 May, 2005 20:50 View latest post
Sergey
No new posts Мод Anti Bot Question MOD - Extended ...
защита от спам-ботов в форме быстрого...
Sergey Поддержка и моды для phpBB2 8 Sun 01 Apr, 2007 18:33 View latest post
Sergey




All times are UTC + 3 Hours
All times are synchronized with the forum server time
Users browsing this topic:1 Guest
Registered Users: None

Jump to:   
printer-friendly view
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum