Notice: CMSB v2.16 Beta!

34 posts by 6 authors in: Forums > CMS Builder
Last Post: August 28, 2012   (RSS)

By Djulia - August 22, 2012

It is perfect! Thanks!

Djulia

Re: [Jason] Notice: CMSB v2.16 Beta!

By Codee - August 22, 2012

Hi Jason, question for you on the speed-performance upgrade of this version. Provided the hosting server meets or exceeds the minimum requirements, is upgrading all that is needed to see speed improvements or must the .php pages be recoded? (say from versions 2.11 - 2.14 or 2.15)
Thanks!

Re: [equinox69] Notice: CMSB v2.16 Beta!

By Dave - August 23, 2012

Hi equinox69, upgrading is all that is required, we benchmarked the code and rewrote the slowest parts, as well as changed the data format for the data files to something that could be read instantly by PHP. Sites with lots of sections and plugins will notice the biggest difference.

Everyone, try reloading on the CMS Admin welcome page that you see after login a few times (just admin.php) before and after upgrading and post if you see a big difference in the execute time (the seconds are shown at the bottom of the screen). Or just post your execute time, interesting to even just see the difference between servers.

Thanks!
Dave Edis - Senior Developer
interactivetools.com

By Dave - August 23, 2012

Execute times on my home PC running WAMP Server:
Before upgrade (2.15): 0.30, 0.32, 0.30
After upgrade (2.16): 0.15, 0.17, 0.16

Be sure to reload a few times, I get an odd higher number here and there, likely my computer doing something else in the background and slowing things down. Also, reload on a page that doesn't do anything else such as the post-login home/welcome page at: admin.php?menu=home

Post yours! And if you've already upgraded post your after times or compare with other installs running on the same server. Thanks!
Dave Edis - Senior Developer
interactivetools.com

By Djulia - August 24, 2012 - edited: August 24, 2012

Hi Dave,

It is an interesting approach!

I have some questions.

Is it possible not to register the emails in the table since the function?

I sent a newletter (it is plugin which we created with the emailTemplate_load function) and all the emails were registered in the table. If a cronjob had been programmed, the emails would be again sent?


Is the emailTemplate_load function more advanced?

Is it possible for example to send a email to the text format ?

I do not understand the use of the Message Headers field. Are the headers sent by the function (emailTemplate_loadFromDB, ...) ?

Thanks for your patience!

Djulia

Re: [Djulia] Notice: CMSB v2.16 Beta!

By Dave - August 24, 2012

Hi Djulia,

No problem, here's some answers. Let me know if anything isn't clear.

>Is it possible not to register the emails in the table since the function?

I'm not sure what you mean? Can you explain?

>I sent a newletter (it is plugin which we created with the emailTemplate_load function)
>and all the emails were registered in the table.

Yes, this will happen if you have logging enabled under: Admin > General Settings > Email Settings

>If a cronjob had been programmed, the emails would be again sent?

No, only if you had set backgroundSend = 1. By default backgroundSend is set to 0. Basically we're using "_outgoing_mail" as both an email queue for bulk mailings and an email log for everything. Nothing will be sent again unless backgroundSend is 1. Maybe a better name would have been "background send pending".

I've attached our current version of background-mailer.php so you can have a look what we're working on.

>Is the emailTemplate_load function more advanced?

emailTemplate_load() hasn't changed. I prefer to use emailTemplate_loadFromDB() which loads the templates from a section in the CMS. As it's easier to edit email templates from within the CMS. We're still working on the multi-language issues for this and those are undocumented features.

I've attached an example /data/schema/email_templates.ini.php schema we use for custom projects (works in 2.16 only). This might be added to the main CMSB eventually. It's very helpful for our custom projects and emailTemplate_loadFromDB() automatically updates the placeholder list.

>Is it possible for example to send a email to the text format ?

It should be with sendMessage() by specifying only text and not HTML. Or perhaps in future with background-mailer (or something similar) if the HTML fields is empty.

>I do not understand the use of the Message Headers field. Are the headers sent by the function (emailTemplate_load, ...) ?

This isn't currently used but you can specify additional headers for sendMessage() so these could be logged here and viewed for reference or set for backgroundSend messages when you wanted additional headers to be used. Examples of additional headers might be Reply-To:, Precedence:, etc. This isn't fully supported or tested yet.

Developing and debugging mail is one of the slowest parts of our development process. These are some of the tools we've been developing internally to speed things up for us, such as being able to view logged messages instead of checking 4-5 email accounts to make sure everything got mailed to the right people, or being able to edit email templates in the CMS instead of a file, and seeing a dynamic list of available placeholders, etc. We've added them to the CMS in the hopes it will speed things up for others as well.

Hope that helps, let me know any other questions (and thanks for your interest!).
Dave Edis - Senior Developer
interactivetools.com

By Djulia - August 24, 2012

>Is it possible not to register the emails in the table since the function?

>>I'm not sure what you mean? Can you explain?


In fact, I wondered whether it is possible to activate the Send & Log, and not to record the emails in the _outgoing_mail table since our plugin (or script) ?

Thanks!

Djulia

By Djulia - August 24, 2012

Will it be possible in the future with emailTemplate_load ?

I like much the approach and the use of this function. It makes it possible to separate correctly the email template from the code! :)

Thanks again!

Djulia

Re: [Djulia] Notice: CMSB v2.16 Beta!

By Dave - August 24, 2012

It would be possible right now like this:

$emailHeaders = emailTemplate_load($options);
$emailHeaders['logging'] = false;
$errors = sendMessage($emailHeaders);
if ($errors) { alert("Mail Error: $errors"); }

I can update emailTemplate_load() so you can set 'logging' in it's options and have it returned by the function. Would that help?

PS: Try emailTemplate_loadFromDB() sometime, it's quite nice to use.
Dave Edis - Senior Developer
interactivetools.com