Obsah fóra
PravidláRegistrovaťPrihlásenie




Táto téma je zamknutá, nemôžete posielať nové príspevky alebo odpovedať na staršie. [ Príspevok: 1 ] 
AutorSpráva
Offline

Prevádzkovateľ fóra
Prevádzkovateľ fóra
Newslettermod

Registrovaný: 01.05.05
Príspevky: 13348
Témy: 1496
Bydlisko: Bratislava
Príspevok NapísalOffline : 13.10.2006 9:22

Kód:
##############################################################
## MOD Title: Newslettermod
## MOD Author: jwacalex < jwacalex@yahoo.de > (Alexander Boehm) http://www.s8d.de
## MOD Description: This Mod adds a newsletterfunktion to your board
##                  Dieser Mod fügt einen Newsletter in dein Board ein
## MOD Version: 0.1.0
##
## Installation Level: n/a
## Installation Time: 0 h, 15 min
## Files To Edit: 8
##                admin/admin_mass_email.php
##                includes/usercp_register.php
##                language/lang_german/lang_main.php
##                language/lang_english/lang_main.php
##                language/lang_german/lang_admin.php
##                language/lang_english/lang_admin.php
##                templates/subSilver/profile_add_body.tpl
## Included Files: n/a
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
##   2005-02-04 - Version 1.0.0
##      -First version relased
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE `phpbb_users` ADD `user_newsletter` VARCHAR( 1 ) DEFAULT '0' NOT NULL ;

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

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['rec_newsletter'] = 'Newsletter empfanGen';

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

#
#-----[ FIND ]------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['rec_newsletter'] = 'Recive Newsletter';

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

#
#-----[ FIND ]------------------------------------------
#
$sql = "INSERT INTO " . USERS_TABLE . "    (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)

#   "I How it works so ;)
#-----[ IN-LINE FIND ]------------------------------------------
#
user_active,

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
user_newsletter,

#
#-----[ FIND ]------------------------------------------
#
            if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )

#
#-----[ BEFORE, ADD ]------------------------------------------
#
            $sql .= "'".$user_newsletter."',";
#                                       
#-----[ FIND ]------------------------------------------
#
        'L_EMAIL_ADDRESS' => $lang['Email_address'],

#
#-----[ AFTER, ADD ]------------------------------------------
#
        'L_NEWSLETTER' => $lang['rec_newsletter'],


#
#-----[ FIND ]------------------------------------------
#
    $strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code');
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, 'confirm_code' => 'confirm_code'

#
#-----[ AFTER, ADD ]------------------------------------------
#
, 'r_newsletter' => 'r_newsletter'

#
#-----[ FIND ]------------------------------------------
#
                SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("'", "''", $email) ."', user_icq = '" . str_replace("'", "''", $icq) . "', user_website = '" . str_replace("'", "''", $website) . "', user_occ = '" . str_replace("'", "''", $occupation) . "', user_from = '" . str_replace("'", "''", $location) . "', user_interests = '" . str_replace("'", "''", $interests) . "', user_sig = '" . str_replace("'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("'", "''", $yim) . "', user_msnm = '" . str_replace("'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("'
", "''", $user_dateformat) . "', user_lang = '" . str_replace("'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("'", "''", $user_actkey) . "'" . $avatar_sql . "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_active = $user_active,

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
user_newsletter = '$r_newsletter',

#
#-----[ FIND ]------------------------------------------
#
    $viewemail = ( isset($HTTP_POST_VARS['viewemail']) ) ? ( ($HTTP_POST_VARS['viewemail']) ? TRUE : 0 ) : 0;
#
#-----[ AFTER, ADD ]------------------------------------------
#
    $newsletter_on_off = ( isset($HTTP_POST_VARS['r_newsletter']) ) ? ( ($HTTP_POST_VARS['r_newsletter']) ? TRUE : 0 ) : 0;
#
#-----[ FIND ]------------------------------------------
#
$viewemail = $userdata['user_viewemail'];

#
#-----[ AFTER, ADD ]------------------------------------------
#
$user_newsletter = $userdata['user_newsletter'];         
#
#-----[ FIND ]------------------------------------------
#
'VIEW_EMAIL_YES' => ( $viewemail ) ? 'checked="checked"' : '',

#
#-----[ AFTER, ADD ]------------------------------------------
#
'NEWS_LETTER_ON_OFF' => ( $user_newsletter ) ? 'checked="checked"' : '',


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

#
#-----[ FIND ]------------------------------------------
#
    <tr>
      <td class="row1"><span class="gen">{L_TIMEZONE}:</span></td>
      <td class="row2"><span class="gensmall">{TIMEZONE_SELECT}</span></td>
    </tr>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
    <tr>
      <td class="row1"><span class="gen">{L_NEWSLETTER}:</span></td>
      <td class="row2"><span class="gensmall"><input type="checkbox" name="r_newsletter" value="1" {NEWS_LETTER_ON_OFF}></span></td>
    </tr>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_german/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['usr_letter'] = 'Newsletter-Empfänger';
     
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php

#
#-----[ FIND ]------------------------------------------
#
// That's all Folks!

#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['usr_letter'] = 'Newsletter-Reciver';

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

#
#-----[ FIND ]------------------------------------------
#
if ( $row = $db->sql_fetchrow($result) )
{
    do
    {
        $select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
    }
    while ( $row = $db->sql_fetchrow($result) );
}

#
#-----[ AFTER, ADD ]------------------------------------------
#
$select_list .= '<option value = "newsletter">' . $lang['usr_letter'] . '</option>';

#
#-----[ FIND ]------------------------------------------
#
$sql = ( $group_id != -1 ) ? "SELECT u.user_email FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending <> " . TRUE . " AND u.user_id = ug.user_id" : "SELECT user_email FROM " . USERS_TABLE;

#
#-----[ REPLACE WITH ]------------------------------------------
#
if($group_id!="newsletter")
{
  $sql = ( $group_id != -1 ) ? "SELECT u.user_email FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending <> " . TRUE . " AND u.user_id = ug.user_id" : "SELECT user_email FROM " . USERS_TABLE;
}
else
{
  $sql = "SELECT user_email FROM " . USERS_TABLE . " WHERE user_newsletter = '1' AND  user_active = '1'";
}

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







_________________
Streacom DA2 | SilverStone Titanium SX800-LTI 800W | ASRock X299E-ITX/ac | Intel Core i9-9980XE & be quiet! Dark Rock TF | Kingston HyperX Impact 64 GB DDR4 2666 MHz | NVIDIA Titan RTX 24 GB | Intel SSD Optane 905P 480 GB NVMe U.2 & Intel SSD 750 1,2 TB NVMe U.2 & Intel SSD 660p 2 TB NVMe M.2 & Seagate BackUp Plus Portable 56 TB USB | 55" 4K OLED Dell Alienware AW5520QF & 24" LCD EIZO FlexScan EV2451 | Ergotron LX Wall Mount Keyboard Arm | Logitech Craft | Logitech G603 | Logitech F710 | Harman Kardon Sabre SB 35 & Sennheiser RS 175 | Microsoft Windows 7 Ultimate | APC Back-UPS ES 700 | Lenovo ThinkPad X250 | iPhone X 256 GB & Pitaka Aramid | SilverStone ML05B Milo | Corsair SF600 SFX 600W | ASRock X99E-ITX/ac | Intel Xeon E5-2683 v4 & NOCTUA NH-L12S | Kingston HyperX Savage 32 GB DDR4 2400 MHz | NVIDIA GeForce GT 710 1 GB | Intel SSD Optane Memory 32 GB NVMe M.2 & Intel SSD 730 240 GB SATA | Ubuntu Server
Táto téma je zamknutá, nemôžete posielať nové príspevky alebo odpovedať na staršie. [ Príspevok: 1 ] 


Nemôžete zakladať nové témy v tomto fóre
Nemôžete odpovedať na témy v tomto fóre
Nemôžete upravovať svoje príspevky v tomto fóre
Nemôžete mazať svoje príspevky v tomto fóre

Skočiť na:  

Powered by phpBB Jarvis © 2005 - 2024 PCforum, webhosting by WebSupport, secured by GeoTrust, edited by JanoF
Ako väčšina webových stránok aj my používame cookies. Zotrvaním na webovej stránke súhlasíte, že ich môžeme používať.
Všeobecné podmienky, spracovanie osobných údajov a pravidlá fóra