We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16545
    • 358 Posts
    I did all the steps by instruction.

    Quote from: Glen at Dec 08, 2009, 07:42 AM

    Oh, for your problem labasus, do you have the files in the modules directory? First I did put my files to plugins directory.

    Solved: It was my error, I’ve missed to add the configuration lines in module config
      • 20349 ☆ A M B ☆
      • 453 Posts
      Quote from: bunk58 at Nov 05, 2008, 05:02 AM

      Here’s a snippet that will insert the records from an excel generated csv file into the EasyNewsletters subscribers table.
      There are three parameters :
      &table name of the subscribers DB table
      &csv name of the csv file ( doesn’t need the .csv extension )
      &csvpath path to the csv file on the server
      The csv file should have the seven columns :
      firstname, lastname, email, status, blocked, lastnewsletter, created ( see attached .csv file )
      Ideally this could be incorporated into the EasyNewsletter module itself, maybe with a file upload feature, but that would take longer wink
      <?php
      $table = (isset($table)) ? $table : 'easynewsletter_subscribers'; // name of the table for updating
      $csv = (isset($csv)) ? $csv : 'subscribers'; // name of the csv file for updating the table - doesn't need the .csv extension
      $csvpath= (isset($csvpath)) ? $csvpath : 'assets/csv/'; // path to the folder the csv file is stored in
      $basePath = $modx->config['base_path'];
      if (file_exists($basePath.$csvpath.$csv.".csv")){
      $fp = fopen($basePath.$csvpath.$csv.".csv","r");
      while($data=fgetcsv($fp,900000,",")){
      $firstname = addslashes($data[0]);
      $lastname = addslashes($data[1]);
      $email = addslashes ($data[2]);
      $status = addslashes($data[3]);
      $blocked = addslashes($data[4]);
      $lastnewsletter = addslashes($data[5]);
      $created = addslashes($data[6]);
      $fields = array ('firstname' => $modx->db->escape($firstname), 'lastname' => $modx->db->escape($lastname), 'email' => $modx->db->escape($email),
      'status' => $modx->db->escape($status), 'blocked' => $modx->db->escape($Measure), 'lastnewsletter' => $modx->db->escape($lastnewsletter), 'created' => $modx->db->escape($created));
      $rs = $modx->db->insert($fields, $table);
      }
      }
      ?>

      I tested it quickly, but if you have any problems, report back!


      subscribers .xls example (saved as subscribers.csv) doesn’t work for me... It is populating wrong table columns I guess... Everything is listed under "name"



      any help on this? smiley



      EDIT: I created a new .xls table... saved it as .csv and imported it via phpmyadmin...
        BASE - Web Design Studio
        MODX Ambassador

        Website
        • 4310
        • 2,310 Posts
        If all the data is going into one filed in the DB it sounds like either :
        The fields aren’t seperated with ,
        A field with text data which has a , in it hasn’t been encapulated with ""
        This needs to be set correctly when exporting to csv from excel.
          • 20349 ☆ A M B ☆
          • 453 Posts
          I exported DB table from another site also using modx and EN.
          Replaced all the fields and import it into this new one... using phpmyadmin

          Couldn’t get it to work with this sad
            BASE - Web Design Studio
            MODX Ambassador

            Website
            • 20349 ☆ A M B ☆
            • 453 Posts
            I have a question...

            I updated my mailing list which now counts over 3000 mail adresses... Now I can’t send any mail.
            Test mail works fine, but when I try to send it to all the users it crashes...


            any help would be nice... ASAP smiley
              BASE - Web Design Studio
              MODX Ambassador

              Website
              • 20349 ☆ A M B ☆
              • 453 Posts
              Now I keep getting
              Internal Server Error sad

              The server encountered an internal error or misconfiguration and was unable to complete your request.
              
              Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
              
              More information about this error may be available in the server error log.
              
              Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
                BASE - Web Design Studio
                MODX Ambassador

                Website
                • 20743
                • 3 Posts
                I have an issue i have 507 contacts but for some reason when i go into the Module admin page for the easy Newsletter it only shows me my first 25 records and no advance to the next page button, Do you think I can get some help in modifying the admin page so that it displays mutliple pages thanks
                  • 16545
                  • 358 Posts
                  For multilingual site it and more comfortable to use smth. like
                  [[EasyNewsletter? &lang=`your_lang`]]

                  There is a hard linking to backend language right now.
                    • 17075
                    • 1 Posts
                    Hi everybody...

                    Here I share a spanish translation I created. Regards!.

                    
                    # Easy Newsletter 0.3
                    # Created by: lichig
                    # Language: Spanish
                    # ------------------------------------------------------------------------
                    
                    $lang_links_subscribers = "Suscriptores";
                    $lang_links_newsletter = "Newsletter";
                    $lang_links_configuration = "Configuración";
                    
                    $lang_mailinglist = "Please input your name and e-mail to subscribe or unscubscribe our newsletter:";
                    $lang_mailinglist = "Por favor, ingrese su nombre y su E-mail para suscribirse o darse de baja a nuestro newsletter:";
                    $lang_firstname = "Nombre";
                    $lang_lastname = "Apellido";
                    $lang_email = "E-mail";
                    $lang_submit = "Enviar";
                    $lang_subscribe = "Suscribir";
                    $lang_unsubscribe = "Dar de baja";
                    $lang_alreadysubscribed = "Este E-mail ya se encuentra registrado.";
                    $lang_notsubscribed = "Este E-mail no se encuentra en nuestro sistema.";
                    $lang_subscribesuccess = "Gracias por suscribirse a nuestro Newsletter.";
                    $lang_unsubscribesuccess = "Ha sido dado de baja de nuesto Newsletter.";
                    $lang_notvalidemail = "El E-mail ingresado no es válido. Intente nuevamente.";
                    
                    $lang_newsletter_noposts = "No se ha creado ningún Newsletter aun.";
                    $lang_newsletter_test = "Enviando a E-mail de prueba (Fue utilizada la dirección de E-mail especificada en <strong>configuration</strong>).";
                    $lang_newsletter_testmail = "Prueba";
                    $lang_newsletter_delete_alert = "¿Confirma Eliminar?";
                    $lang_newsletter_send_alert1 = "¿Confirma enviar el newsletter?";
                    $lang_newsletter_send_alert2 = "ATENCION!: El newsletter será enviado a TODOS los suscriptores.";
                    $lang_newsletter_create = "Crear Newsletter";
                    $lang_newsletter_date = "Fecha";
                    $lang_newsletter_subject = "Título";
                    $lang_newsletter_status = "Estado";
                    $lang_newsletter_sent = "Enviado";
                    $lang_newsletter_action = "Acci&oacuten";
                    $lang_newsletter_edit = "Editar";
                    $lang_newsletter_delete = "Eliminar";
                    $lang_newsletter_send = "Enviar";
                    $lang_newsletter_sending = "<h1>Enviando Newsletter a TODOS los suscriptores... Por favor espere.</h1>";
                    $lang_newsletter_sending_done1 = "<h2>E-mails enviados!</h2>Enviado ";
                    $lang_newsletter_sending_done2 = " Para ";
                    $lang_newsletter_sending_done3 = " suscriptores";
                    $lang_newsletter_sending_done4 = "<h2>Se produjo un Error</h2>Revise la <strong>Configuration</strong>.";
                    $lang_newsletter_edit_header = "Crear Newsletter aquí.";
                    $lang_newsletter_edit_subject = "Titulo:";
                    $lang_newsletter_edit_save = "Guardar newsletter";
                    $lang_newsletter_edit_update = "Newsletter Actualizada!";
                    $lang_newsletter_edit_delete = "Newsletter Eliminada!";
                    $lang_newsletter_edit_create = "Newsletter Creada!";
                    
                    $lang_subscriber_noposts = "No hay suscriptores registrados.";
                    $lang_subscriber_delete_alert = "¿Confirma Eliminar?:";
                    $lang_subscriber_edit_header = "Editar detalles de suscriptores.";
                    $lang_subscriber_created = "Creado";
                    $lang_subscriber_firstname = "Nombre";
                    $lang_subscriber_lastname = "Apellido";
                    $lang_subscriber_email = "E-mail";
                    $lang_subscriber_edit_action = "Acción";
                    $lang_subscriber_edit_save = "Actualizar Suscriptor";
                    $lang_subscriber_edit_update = "Suscriptor Actualizado!";
                    $lang_subscriber_edit_delete = "Suscriptor Eliminado!";
                    
                    $lang_config_header = "Editar configuración.";
                    $lang_config_mail = "Método de envío";
                    $lang_config_mail_description = "Different kinds of mailing methods. SMTP is recommended.";
                    $lang_config_mail_description = "Diferentes métodos de envío de E-mail (SMTP Recomendado).";
                    $lang_config_smtp = "Servidor SMTP";
                    $lang_config_smtp_description = "Su proveedor de host puede informarle sobre su servidor SMTP.";
                    $lang_config_auth = "Autenticación SMTP?";
                    $lang_config_auth_description = "Solo utilizado en método SMTP.  Usuario y contraseña SMTP Requerido.";
                    $lang_config_true = "Si";
                    $lang_config_false = "No";
                    $lang_config_authuser = "Usuario SMTP";
                    $lang_config_authuser_description = "Usuario para autenticación SMTP. Generalmente es su dirección de E-mail.";
                    $lang_config_authpassword = "Contraseña SMTP";
                    $lang_config_authpassword_description = "Contraseña para autenticación SMTP. Generalmente es la utilizada en su dirección de E-mail.";
                    $lang_config_sendername = "Nombre de Remitente";
                    $lang_config_sendername_description = "El nombre que aparecerá como remitente.";
                    $lang_config_senderemail = "E-mail de Remitente";
                    $lang_config_senderemail_description = "La dirección de E-mail que aparecerá como remitente.";
                    $lang_config_lang_website = "Languaje - website";
                    $lang_config_lang_website_description = "Lenguaje utilizado en el formulario de suscripción.";
                    $lang_config_lang_manager = "Language - manager";
                    $lang_config_lang_manager_description = "Lenguaje utilizado en el panel de administración";
                    $lang_config_save = "Guardar configuración";
                    $lang_config_update = "La configuración ha sido actualizada!";
                    
                    

                      • 15303
                      • 4 Posts
                      I suggest you don’t use this contribution for live sites, since it has a lot of childish security holes.

                      For example try putting the symbol "’" in the firstname or lastname field at the email subscription chunk: user’s information is in not sanitized at all, so it is easy to perform SQL injection!