REGISTER











Tutorial : Notificare user de mesaj privat pe prima pagina
#1
Titlu: Welcome PM on first Login (Avertizeaza userii ca au unnou PM in caz ca nu observa).
Timp instalare :~7 minute

Fisiere de editat(Nu uitati sa faceti back-up inainte de editare).


Code:
includes/constants.php,
includes/functions.php,
includes/functions_user.php


Pasul #1 :

Va duceti in phpmyadmin ,selectati tabela forumului (fprum database name) ,apoi apasati pe tabul "SQL" (rulare comanda SQL).


Code:
CREATE TABLE phpbb_wpm (
    wpm_config_id int(3) NOT NULL,
    wpm_enable tinyint(1) unsigned NOT NULL,
    wpm_send_id mediumint(8) NOT NULL,
    wpm_preview tinyint(1) unsigned NOT NULL,
    wpm_variables varchar(255) NOT NULL,
    wpm_subject varchar(100) NOT NULL,
    wpm_message mediumtext NOT NULL,
    wpm_version varchar(255) NOT NULL,
    PRIMARY KEY    (wpm_config_id)
    ) ;

    INSERT INTO phpbb_wpm (wpm_config_id, wpm_enable, wpm_send_id, wpm_preview, wpm_variables, wpm_subject, wpm_message, wpm_version) VALUES(1, 1, 2, 0, '', 'Welcome to {SITE_NAME}!', 'Hello, {USERNAME}!\n\nWelcome to {SITE_NAME}    ({SITE_DESC})\n\nYou registered on {USER_REGDATE}. According to your input, your email is {USER_EMAIL} and you live in timezone {USER_TZ}. It is nice to know that you speak {USER_LANG_LOCAL}.\n\nYou can contact us here: {BOARD_CONTACT} or here: {BOARD_EMAIL}, whichever you prefer, at anytime. Thank you for choosing us.\n\n-Thank you for registering at {SITE_NAME}!\n\nThanks, {SENDER}', '2.2.5')


Pasul #2

Fisiere de copiat.


Code:
Copy: root/adm/style/acp_wpm.html
To: adm/style/acp_wpm.html
Copy: root/adm/style/posting_buttons.html
To: adm/style/posting_buttons.html
Copy: root/includes/functions_wpm.php
To: includes/functions_wpm.php
Copy: root/includes/acp/acp_wpm.php
To: includes/acp/acp_wpm.php
Copy: root/includes/acp/info/acp_wpm.php
To: includes/acp/info/acp_wpm.php
Copy: root/language/en/mods/info_acp_wpm.php
To: language/en/mods/info_acp_wpm.php


Pasul #3

Deschidem : includes/constants.php



Cautam :

Code:
// Additional constants


Adaugam :

Code:
define('WPM_CONFIG_ID', 1);


Cautam :

Code:
?>


Adaugam pana de tag-ul de inchidere al PHP-ului.

Code:
define('WPM_TABLE',                    $table_prefix . 'wpm');


Pasul #4

Deschidem: includes/functions.php



Cautam :

Code:
// Special case... the user is effectively banned, but we allow founders to login
            if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER)
            {
                return;
            }


Dupa acest cod adaugam :

Code:
/*
            * Welcome PM on First Login (WPM)
            * By DualFusion /adjusted by ..::Frans::.. for phpbb3 GOLD
            */
            $sql = 'SELECT wpm_enable FROM '.WPM_TABLE.' WHERE wpm_config_id =1';
            $result = $db->sql_query($sql);
            $row = $db->sql_fetchrow($result);
            $db->sql_freeresult($result);


            if($row['wpm_enable'] && $user->data['user_lastvisit'] == 0)
            {
                include($phpbb_root_path . 'includes/functions_wpm.' . $phpEx);
                $wpm = new welcome_pm();
                $wpm->get_vars();
                $wpm->send_wpm();
            }
            /* End WPM */


Pasul #5

Deschidem: includes/functions_user.php



Cautam :

Code:
'user_options'        => 895,


Inlocuim (ATENTIE ,inlocuiti nu adaugati) :

Code:
'user_options'        => 1919,


Dupa instalare dati un PURGE CACHE din ACP si instalati mod-ulul de acolo.
#2
T.C . Model nerespectat



Powered by MyBB All rights reserved
Developed with for FASTCS 2011 - 2024 FASTCS