php forum
php mysql forum
php mysql smarty
 
Topic Options
#41442 - 01/12/01 06:34 PM disable/enable e-mail notification (ubb 5.47d)
CopyCat Offline
Member

Registered: 12/01/00
Posts: 760
Loc: nowhere
in postings.cgi

** find **

sub DoTheEdit {

** under this sub find **

# append edit note to the message

** replace for **

# begin turn off email notification in edit time 0-7 fields
if ($in{'ReplyNum'} eq '000000' && $UseEmail eq 'ON') {
$cataux = $editthread[0];
@firstpostlinecat = split(/||/, $cataux);

if ($in{'DisableNotificationcat'} ne 'yes') {
$firstpostlinecat[1] = '';
$cataux = $firstpostlinecat[0] . '||' . $firstpostlinecat[1] . '||' . $firstpostlinecat[2] . '||' . $firstpostlinecat[3] . '||' . $firstpostlinecat[4] . '||' . $firstpostlinecat[5] . '||' . $firstpostlinecat[6] . '||' . $firstpostlinecat[7];
$editthread[0] = $cataux;
} else {
$firstpostlinecat[1] = 'N';
$cataux = $firstpostlinecat[0] . '||' . $firstpostlinecat[1] . '||' . $firstpostlinecat[2] . '||' . $firstpostlinecat[3] . '||' . $firstpostlinecat[4] . '||' . $firstpostlinecat[5] . '||' . $firstpostlinecat[6] . '||' . $firstpostlinecat[7];
$editthread[0] = $cataux;
}
}
# end turn off email notification in edit time

# append edit note to the message

** find **

sub EditPost {

** find under this sub **

print <<EditFORM;

** replace for **

# begin turn off e-mail notification in edit
if ($in{'ReplyNum'} eq '000000' && $UseEmail eq 'ON') {
$cataux = $thisthread[0];
@firstpostlinecat = split(/||/, $cataux);

if ($firstpostlinecat[1] eq '') {
$DisableNotificationcat = '
<INPUT TYPE="CHECKBOX" NAME="DisableNotificationcat" VALUE="yes"> <b>Email Notification:</b> emails sent to you whenever someone replies. Only registered users are eligible.';
} else {
$DisableNotificationcat = '
<INPUT TYPE="CHECKBOX" NAME="DisableNotificationcat" VALUE="yes" checked> <b>Email Notification:</b> emails sent to you whenever someone replies. Only registered users are eligible.';
}
}
# end turn off e-mail notification in edit

print <<EditFORM;

** find **

$DisableSmiliesWording

** replace for **

$DisableSmiliesWording
$DisableNotificationcat


thats it i think. its working fine here

quick explanation: this will give topic starters the ability to turn on/off e-mail notification by editing their 1st messages.

edit: added compatibility with "Email Features On" in General Settings options

------------------
<IMG SRC="http://banco.jogosonline.com.br/imagensforum/copysig.gif" border=0>

<FONT COLOR="#6699cc" SIZE="1" FACE="Verdana, Arial">This message has been edited by CopyCat on January 12, 2001 at 09:28 PM</font>

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks