vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Board Optimization - vMail Converter - Send out your emails in different encoding (https://vborg.vbsupport.ru/showthread.php?t=182626)

Milad 06-15-2008 10:00 PM

vMail Converter - Send out your emails in different encoding
 

Introduction:
In order to solve the problem with unicode (UTF-8) in some Email Service Providers (such as Hotmail, Yahoo and many others), I created this product.
It converts the sent out messages only, from your real encoding into an encoding of choice, both encodings, the source & destination must be supported by iconv.
You may know, I had converted to UTF-8 and faced this problem, now it's solved.

Caution:
This product is provided As Is without warranties.

Requirements:
  • vBulletin 3.7.1+
  • iconv PHP extension is installed on your system, or your PHP version is 5 and above.

Supported Encodings:
See http://www.gnu.org/software/libiconv/#introduction

Installation or Upgrading:
  1. Import the product file product-vmail_converter.xml (Choose Yes when Upgrade).
  2. Go to vBulletin Options -> Email Options -> vMail Converter - Destination Encoding.
  3. Set your Destination Encoding and save (For me, It's windows-1256).
  4. In /includes/class_mail.php Replace every
    PHP Code:

    $stylevar['charset'

    WITH
    PHP Code:

    $this->get_charset() 

  5. In /includes/class_mail.php Replace every
    PHP Code:

    $vbulletin->options['bbtitle'

    WITH
    PHP Code:

    $this->converted_bbtitle() 

  6. In /includes/class_mail.php Find
    PHP Code:

    $toemail $this->fetch_first_line($toemail); 

    Add after:

    PHP Code:

            // vMail Converter START
            
    $subject $this->vmail_convert($subject);
            
    $message $this->vmail_convert($message);
            if (
    $from != '')
            {
                
    $from $this->vmail_convert($from);
            }
            if (
    $uheaders != '')
            {
                
    $uheaders $this->vmail_convert($uheaders);
            }
            if (
    $username != '')
            {
                
    $username $this->vmail_convert($username);
            }
            
    // vMail Converter END 

  7. In /includes/class_mail.php Find again
    PHP Code:

        function start($toemail$subject$message$from ''$uheaders ''$username '')
        { 

    Add before:
    PHP Code:

        // vMail Converter START
        
    function vmail_convert($item)
        {
        global 
    $stylevar;
        
            if (
    function_exists('iconv') AND $item != '')
            {
                return @
    iconv($stylevar['charset'], $this->registry->options['vmail_converter_destination'], $item);
            }
            else
            {
                return 
    $item;
            }
        }
        
        function 
    get_charset()
        {
            global 
    $stylevar;
            
            if (
    function_exists('iconv'))
            {
                return 
    $this->registry->options['vmail_converter_destination'];
            }
            else
            {
                return 
    $stylevar['charset'];
            }
        }
        
        function 
    converted_bbtitle()
        {
            global 
    $vbulletin;
            return 
    $this->vmail_convert($vbulletin->options['bbtitle']);
        }
        
    // vMail Converter END 

  8. Find:
    PHP Code:

                if (isset($vbphrase['x_mailer']))
                { 

    Add After:
    PHP Code:

    $vbphrase['x_mailer'] = $this->vmail_convert($vbphrase['x_mailer']); 

    Save and upload the file again.
  9. You're done.

Known issues:
  • none.

Versions:
  • 1.0.0 (initial release). (5. April 2007)
  • 1.1.0 (10. April 2007)
  • 1.1.1 (11. April 2007) fix a bug
  • 1.2.0 (17. May 2007) Very good version, every bug fixed.
  • 1.3.0 (16 June 2008) Version for 3.7.1

Support is given for who clicks "install" only.
Mark it as "Installed" to receive updates and support.

tuwebfacil 06-16-2008 06:36 AM

Thanks!!!

M? Mostafa 06-16-2008 06:57 AM

Thank u Milad;)

Milad 06-16-2008 12:54 PM

I'm sorry.

I forgot to list a step.
Please add the step 8 to your modified file.

Best regards

djrapid.com 10-13-2008 12:26 AM

Are you supposed to include
Quote:

$this->
at the start of every code that is to be replaced?
Thanks

Milad 10-13-2008 05:07 AM

You're supposed to make the edits as instructed.

Pokerbanter 03-08-2009 01:13 PM

So how do I uninstall this?

I installed it and it didn't work. Found out after that i'm only running php 4.

Undid all the file changes above and uninstalled product but now I can't send email at all whereas I was able to before.

Milad 03-08-2009 01:29 PM

Upload brand new version of the file: /includes/class_mail.php

Sup101 04-18-2009 07:58 PM

Works with 3.8 >?

cgway.net 04-27-2009 06:45 AM

Works with 3.8 >?

kapii 04-29-2009 06:33 PM

It doesn't show up in the vBoption panel in 3.8.2, so you can't set it, and my guess is it's going to take some coding to make it work. It does show up in the product list though.

Hopefully we will be able to use it soon. Thanks for the efforts you have made so far, though!

AliMadkour 05-31-2009 03:22 PM

thanks ,
installed and work fine ,

cgway.net 07-21-2009 10:02 PM

Works with 3.8 >?????

matrex722 09-17-2010 10:48 AM

i realy want this mod for 3.85

please do somthing

اهلا ميلاد

انا عدلت اللي فوق لكن اللي اتصلح العنوان للرسالة

بعد ما كان رموز اصبح يظهر بشكل طبيعي

لكن محتوي الرسالة بيكون فارغ

matrex722 09-08-2011 11:16 PM

ارجوك الحل للنسخ 3.8


All times are GMT. The time now is 04:54 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01180 seconds
  • Memory Usage 1,773KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (10)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (15)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete