Giter VIP home page Giter VIP logo

nz.co.fuzion.cssinline's Introduction

css inline

See http://fuzion.co.nz/blogs/styling-mails-civimails-civicrm and https://civicrm.org/extensions/css-inline

The summary (in Xavier's words):

Writing html email is a PITA.

Most of the mail clients (or webmails) are stuck in the past and can't render properly any html that follows more modern techniques than my grandpa used (hello longjohns and html tables for layout).

Moreover, they don't deal with stylesheets. This civicrm extension helps you with that part, by applying to every html element the styles that should have been applied automatically if bloody webmails behaved.

No more blue underlined links on gmail, no more time new roman on outlook.

nz.co.fuzion.cssinline's People

Contributors

eileenmcnaughton avatar tttp avatar leaf-node avatar megaphonejon avatar jackrabbithanna avatar sunilpawar avatar

Stargazers

 avatar David Thompson avatar

Watchers

 avatar  avatar  avatar Richard van Oosterhout avatar  avatar

nz.co.fuzion.cssinline's Issues

parse_url(): Passing null to parameter #1 ($url) of type string is deprecated

The extension is still working ok but still I thought it would be good to record this notice.

PHP Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /var/www/vhosts/xyz/web/sites/all/modules/civicrm_extensions/nz.co.fuzion.cssinline/packages/cssin/src/CSSIN.php on line 257

  • CiviCRM: 5.69
  • CMS: Drupal 7.99
  • PHP: 8.0.30 (fpm-fcgi)
  • Database: 10.11.4-MariaDB-1~deb12u1 engine: InnoDB 10 row format: Dynamic, Compressed
  • Webserver: Apache/2.4.57 (Debian)

Max Execution Time

Eileen: Now that we're on CiviCRM 5.10.3 we're hitting errors on max execution time of 300 in this extension. I added a .htaccess setting it to 800 in the directory.
.../public_html/sites/all/civiextensions/nz.co.fuzion.cssinline/packages/cssin/vendor/simple_html_dom/simple_html_dom.php on line 684
Can anything be done? What are best practices?

Missing LICENSE

I see you have no LICENSE file for this project. The default is proprietary.

I would suggest released the code under the GPLv3 or AGPLv3 license so that others are encouraged to contribute changes back to your project.

Thanks! : )

Indirect modification of overloaded property CRM_Core_Smarty::$template_dir has no effect in cssinline.civix.php

I'm using PHP 8.3, Nginx and Smarty4.
Don't know if this is only occurring with this specifications, but I also found that the modification of "template_dir" is not totally consistent with the Smarty class implementation.
Got an improved version that works for my setup.
I don't know if this also works for earlier PHP version and/or Smarty.

  static $configured = FALSE;
  if ($configured) return;
  $configured = TRUE;

  $template = CRM_Core_Smarty::singleton();

  $extRoot = dirname( __FILE__ ) . DIRECTORY_SEPARATOR;
  $extDir = $extRoot . 'templates';

  if ( is_array( $template->template_dir ) ) {
        $template->addTemplateDir($extDir);
  } else {
        $currentDirs = array($extDir, $template->getTemplateDir());
        $template->setTemplateDir($currentDirs);
  }

  $include_path = $extRoot . PATH_SEPARATOR . get_include_path( );
  set_include_path( $include_path );
}

Fatal error: require_once(): Failed opening required 'CSSIN.php'

I don't know if it is an issue but I recently upgrade CiviCRM to 4.7.10 and when Send Scheduled Mailings cron job runs I get this error:

Fatal error: require_once(): Failed opening required 'CSSIN.php'

I workaround this by patching line104 of cssinline.php from

require_once 'CSSIN.php';

to

require_once 'packages/cssin/src/CSSIN.php';

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.