Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2001
Posts: 2,285
Old Hand
Old Hand
Joined: Feb 2001
Posts: 2,285
I'd like to see a mod that would make it so all forum members had the "Use Forum" email setting preset. I want this not to be an option, but instead be the only way to email members through the forum.

Is this possible?

Sponsored Links
Joined: Feb 2001
Posts: 2,285
Old Hand
Old Hand
Joined: Feb 2001
Posts: 2,285
Did I post this in the wrong forum? confused

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
untested.

In public_edit_profile.pl
FIND:
Code
		<input type="radio" id="EmailView-noform" name="EmailView" value="noform" $ev_form /> <label for="EmailView-noform">$vars_wordlets{email_form_only}</label>
REPLACE WITH:

Code
		<input type="hidden" id="EmailView-noform" name="EmailView" value="noform" />
then, a few lines later, find:

Code
	if($vars_display{EmailBlock} ne "OFF") {
$viewable = qq~<input type="hidden" name="EmailView" value="no" />~;
} # end if
ADD AFTER:

Code
 $viewable = qq~$email_view_pref2~;
In public_register_form.pl

FIND:
Code
	my @op1 = qw(yes noform no);
my @op2 = qw(yes no);
my @opts = ($vars_email{UserMailPref} eq "ON" ? @op1 : @op2);
print &GenerateLineHTML("REQ", $vars_wordlets{email_viewable},
"", "EmailView", "radio",
{ yes => $vars_wordlets{email_viewable_yes}, no => $vars_wordlets{email_viewable_no}, noform => $vars_wordlets{email_form_only} },
[@opts], "yes");
REPLACE WITH:

Code
print qq~<input type="hidden" id="EmailView-noform" name="EmailView" value="noform" />~;
Untested, but should work

Joined: Mar 2001
Posts: 7,394
LK Offline
Admin / Code Breaker
Admin / Code Breaker
Offline
Joined: Mar 2001
Posts: 7,394
Ofcourse they can edit this hidden thnigy to cheat and not use the form...

ubb_profile.cgi might have to have:
instead of:
Code
	$user_profile[11] = $in{EmailView};
use
Code
	$user_profile[11] = "noform";
ubb_registration.cgi:
instead of:
Code
		$GotTime{HyphenDate}, $in{EmailView}, $sig_html, $in{icq}, $in{AllowMassMail},    #10
use:
Code
		$GotTime{HyphenDate}, "noform", $sig_html, $in{icq}, $in{AllowMassMail},    #10

Joined: Jan 2000
Posts: 5,073
Admin Emeritus
Admin Emeritus
Joined: Jan 2000
Posts: 5,073
You can also consider putting the control on the email form side of things.


UBB.classic: Love it or hate it, it was mine.
Sponsored Links
Joined: Feb 2001
Posts: 2,285
Old Hand
Old Hand
Joined: Feb 2001
Posts: 2,285
Thanks guys... so do I use both of the above blocks of code or just one?

I just want this to be the defaut way.. the ONLY way that the users' email address can be mailed to through the forum.

Again, thanks

Joined: Jan 2003
Posts: 3,456
Likes: 2
Master Hacker
Master Hacker
Offline
Joined: Jan 2003
Posts: 3,456
Likes: 2
ok, and easier was is this...

In ubb_profile.cgi
FIND: ~1061
Code
	if($in{d} ne "send") {
REPLACE WITH:

Code
$email_view = "noform";
if($email_view ne "noform") {
that's all you need to do if I read the code correctly

Joined: Feb 2001
Posts: 2,285
Old Hand
Old Hand
Joined: Feb 2001
Posts: 2,285
Again, thanks! I'll let you know how it works. smile


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)