#57165
01/28/2004 6:45 PM
|
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?
|
|
|
#57166
01/30/2004 2:21 AM
|
Joined: Feb 2001
Posts: 2,285
Old Hand
|
Old Hand
Joined: Feb 2001
Posts: 2,285 |
Did I post this in the wrong forum? 
|
|
|
#57167
01/30/2004 10:07 AM
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
untested. In public_edit_profile.pl FIND: <input type="radio" id="EmailView-noform" name="EmailView" value="noform" $ev_form /> <label for="EmailView-noform">$vars_wordlets{email_form_only}</label> REPLACE WITH: <input type="hidden" id="EmailView-noform" name="EmailView" value="noform" /> then, a few lines later, find: if($vars_display{EmailBlock} ne "OFF") { $viewable = qq~<input type="hidden" name="EmailView" value="no" />~; } # end if ADD AFTER: $viewable = qq~$email_view_pref2~; In public_register_form.pl FIND: 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: print qq~<input type="hidden" id="EmailView-noform" name="EmailView" value="noform" />~; Untested, but should work
|
|
|
#57168
01/30/2004 10:14 AM
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
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: $user_profile[11] = $in{EmailView}; use $user_profile[11] = "noform"; ubb_registration.cgi: instead of: $GotTime{HyphenDate}, $in{EmailView}, $sig_html, $in{icq}, $in{AllowMassMail}, #10 use: $GotTime{HyphenDate}, "noform", $sig_html, $in{icq}, $in{AllowMassMail}, #10
|
|
|
#57169
01/30/2004 1:55 PM
|
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.
|
|
|
#57170
01/30/2004 7:11 PM
|
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
|
|
|
#57171
01/30/2004 7:31 PM
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
ok, and easier was is this... In ubb_profile.cgi FIND: ~1061 REPLACE WITH: $email_view = "noform"; if($email_view ne "noform") { that's all you need to do if I read the code correctly
|
|
|
#57172
01/30/2004 8:10 PM
|
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. 
|
|
|
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.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|