Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic Modifikation in YaBB 2.6.12 (Read 285 times)
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 852
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Modifikation in YaBB 2.6.12
Mar 14th, 2023 at 7:01am
Mark & QuoteQuote  
Because there were always script violations. I modified the following lines in the Email.lng.

Search:
Code (Perl)
Select All
<a href="{yabb scripturl}?action=activate&username={yabb cryptusername}&activationkey={yabb activationcode}">{yabb scripturl}?action=activate&username={yabb cryptusername}&activationkey={yabb activationcode}</a> 


Replace:
Code (Perl)
Select All
{yabb scripturl}?action=activate&username={yabb cryptusername}&activationkey={yabb activationcode} 



Search:
Code (Perl)
Select All
You may change your password after you login by clicking on the User CP tab at the top of the {yabb mbname} main page: <a href="{yabb scripturl}">{yabb scripturl}</a> and then click the Profile tab, click on Edit Profile (you will need to enter your password as a security measure). 


Replace:
Code (Perl)
Select All
You may change your password after you login by clicking on the User CP tab at the top of the {yabb mbname} main page: {yabb scripturl} and then click the Profile tab, click on Edit Profile (you will need to enter your password as a security measure). 



... and so forth

In short:
Removes all html code, it is absolutely not needed.

If you can't figure it out, please contact me.


Mailer.pm

Code (Perl)
Select All
Search:
     elsif ( $mailtype == 1 ) {
         $smtp_to      = $to;
         $smtp_from    = $from;
         $smtp_message = qq~<pre $pre>$message</pre>~;
         $smtp_subject = $subject;
         $smtp_charset = $charsetheader;
         require Sources::Smtp;
         use_smtp();

     } 



Replace:
Code (Perl)
Select All
    elsif ( $mailtype == 1 ) {
         $smtp_to      = $to;
         $smtp_from    = $from;
         $smtp_message = qq~$message~;
         $smtp_subject = $subject;
         $smtp_charset = $charsetheader;
         require Sources::Smtp;
         use_smtp();

     } 



Search:
Code (Perl)
Select All
        eval q^
             $smtp->mail($from);
             foreach (split /, /sm, $to) { $smtp->to($_); }
             $smtp->data();
             $smtp->datasend("To: $toheader\r\n");
             $smtp->datasend("From: $fromheader\r\n");
             $smtp->datasend("X-Mailer: YaBB Net::SMTP\r\n");
             $smtp->datasend("Subject: $subject\r\n");
             $smtp->datasend("MIME-Version: 1.0\r\n$cte\nContent-Type: text/html\; charset=$charsetheader\r\n");
             $smtp->datasend("\r\n");
             $smtp->datasend("<pre $pre>$message</pre>");
             $smtp->dataend();
             $smtp->quit();
         ^;
         if ($EVAL_ERROR) {
             fatal_error( 'net_fatal',
                 "$error_txt{'error_verbose'}: $EVAL_ERROR" );
         }
         return 1;

     } 



Replace:
Code (Perl)
Select All
        eval q^
             $smtp->mail($from);
             foreach (split /, /sm, $to) { $smtp->to($_); }
             $smtp->data();
             $smtp->datasend("To: $toheader\r\n");
             $smtp->datasend("From: $fromheader\r\n");
             $smtp->datasend("X-Mailer: YaBB Net::SMTP\r\n");
             $smtp->datasend("Subject: $subject\r\n");
             $smtp->datasend("MIME-Version: 1.0\r\n$cte\r\nContent-Type: text/html\; charset=$charsetheader\r\n");
             $smtp->datasend("\r\n");
             $smtp->datasend("$message");
             $smtp->dataend();
             $smtp->quit();
         ^;
         if ($EVAL_ERROR) {
             fatal_error( 'net_fatal',
                 "$error_txt{'error_verbose'}: $EVAL_ERROR" );
         }
         return 1;

     } 


  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Paste Member Name in Quick Reply Box pyragony54
Language
***
Offline


I Love YaBB!

Posts: 852
Location: Йошкар-Ола
Joined: May 25th, 2014
Gender: Male
Mood: Dead
Zodiac sign: Scorpio
Re: Modifikation in YaBB 2.6.12
Reply #1 - Mar 14th, 2023 at 7:41am
Mark & QuoteQuote  
Search:
Code (Perl)
Select All
        # Dummy mail engine
         fopen( MAIL, ">>$vardir/mail.log" );
         print {MAIL} 'Mail sent at ' . scalar gmtime() . "\n"
           or croak "$croak{'print'} mail";
         print {MAIL} "To: $toheader\n"     or croak "$croak{'print'} mail";
         print {MAIL} "From: $fromheader\n" or croak "$croak{'print'} mail";
         print {MAIL} "X-Mailer: YaBB Sendmail\n"
           or croak "$croak{'print'} mail";
         print {MAIL} "Subject: $subject\n\n" or croak "$croak{'print'} mail";
         $message =~ s/\r\n/\n/gsm;
         print {MAIL} "<pre $pre>$message</pre>\n"         or croak "$croak{'print'} mail";
         print {MAIL} "End of Message\n\n" or croak "$croak{'print'} mail";
         fclose(MAIL);
         return 1;
     }
     return;
 } 



Replace:
Code (Perl)
Select All
        # Dummy mail engine
         fopen( MAIL, ">>$vardir/mail.log" );
         print {MAIL} 'Mail sent at ' . scalar gmtime() . "\n"
           or croak "$croak{'print'} mail";
         print {MAIL} "To: $toheader\n"     or croak "$croak{'print'} mail";
         print {MAIL} "From: $fromheader\n" or croak "$croak{'print'} mail";
         print {MAIL} "X-Mailer: YaBB Sendmail\n"
           or croak "$croak{'print'} mail";
         print {MAIL} "Subject: $subject\n\n" or croak "$croak{'print'} mail";
         $message =~ s/\r\n/\n/gsm;
         print {MAIL} "$message\n"         or croak "$croak{'print'} mail";
         print {MAIL} "End of Message\n\n" or croak "$croak{'print'} mail";
         fclose(MAIL);
         return 1;
     }
     return;
 } 



Search:
Code (Perl)
Select All
sub tomail {
     my ( $MAIL, $mailout ) = @_;
     my ( $fromheader, $toheader, $subject, $message, $charsetheader ) =
       @{$mailout};
     print {$MAIL} "To: $toheader\n"           or croak "$croak{'print'} mail";
     print {$MAIL} "From: $fromheader\n"       or croak "$croak{'print'} mail";
     print {$MAIL} "X-Mailer: YaBB Sendmail\n" or croak "$croak{'print'} mail";
     print {$MAIL} "Subject: $subject\n"       or croak "$croak{'print'} mail";
     print {$MAIL} "MIME-Version: 1.0\r\n" or croak "$croak{'print'} mail";
     print {$MAIL} "$cte\n" or croak "$croak{'print'} mail";
     print {$MAIL} "Content-Type: text/html\; charset=$charsetheader\r\n"
       or croak "$croak{'print'} mail";
     $message =~ s/\r\n/\n/gsm;
     print {$MAIL} "<pre $pre>$message</pre>\n" or croak "$croak{'print'} mail";
     return;
 } 


Replace:
Code (Perl)
Select All
sub tomail {
     my ( $MAIL, $mailout ) = @_;
     my ( $fromheader, $toheader, $subject, $message, $charsetheader ) =
       @{$mailout};
     print {$MAIL} "To: $toheader\n"           or croak "$croak{'print'} mail";
     print {$MAIL} "From: $fromheader\n"       or croak "$croak{'print'} mail";
     print {$MAIL} "X-Mailer: YaBB Sendmail\n" or croak "$croak{'print'} mail";
     print {$MAIL} "Subject: $subject\n"       or croak "$croak{'print'} mail";
     print {$MAIL} "MIME-Version: 1.0\r\n" or croak "$croak{'print'} mail";
     print {$MAIL} "$cte\n" or croak "$croak{'print'} mail";
     print {$MAIL} "Content-Type: text/html\; charset=$charsetheader\r\n"
       or croak "$croak{'print'} mail";
     $message =~ s/\r\n/\n/gsm;
     print {$MAIL} "$message\n" or croak "$croak{'print'} mail";
     return;
 } 



This will fix all script error messages.
If you want to install mods or have them, please make sure that there is no html code. If you need help, you are welcome to leave a message here, I will then be happy to adapt the mod.
  

if (idea == 'none') {use (manuals) && (Google | | search)}
if ($ answer == 0) {post (question)}
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
Modifikation in YaBB 2.6.12

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry