Add mailstream plugin #109

Merged
mexon merged 2 commits from mailstream into master 2013-03-24 08:39:00 +01:00
mexon commented 2013-03-17 02:57:07 +01:00 (Migrated from github.com)

My first plugin. A couple of things where I'm not sure what is the Right Thing to do:

  • I depend on PHPmailer, so I've just included the module directly. This is ugly, but saves bothering the user with requests to install it on their system separately.
  • I've created my own database table, mostly there to translate back from Message IDs to URIs.
  • To deal with schema changes, I use a separate schema version number stored in config. This is independent of the module version number.
  • I use thr-parent to set the In-Reply-To header
My first plugin. A couple of things where I'm not sure what is the Right Thing to do: - I depend on PHPmailer, so I've just included the module directly. This is ugly, but saves bothering the user with requests to install it on their system separately. - I've created my own database table, mostly there to translate back from Message IDs to URIs. - To deal with schema changes, I use a separate schema version number stored in config. This is independent of the module version number. - I use thr-parent to set the In-Reply-To header
tobiasd commented 2013-03-19 14:25:03 +01:00 (Migrated from github.com)

I'm not 100% sure but I think you need to provide the template files also for the smarty3 engine.

I'm not 100% sure but I think you need to provide the template files also for the smarty3 engine.
mexon commented 2013-03-20 01:44:43 +01:00 (Migrated from github.com)

I originally wrote this before the shift to smarty3, so it uses the old style templates. It does work. I can port the templates to smarty3, but I wanted to get something working checked in. I don't have a lot of time to spend on this.

I originally wrote this before the shift to smarty3, so it uses the old style templates. It does work. I can port the templates to smarty3, but I wanted to get something working checked in. I don't have a lot of time to spend on this.
unary commented 2013-03-20 02:31:55 +01:00 (Migrated from github.com)

There is a Python script to convert Friendica templates to smarty: util/friendica-to-smarty-tpl.py

There is a Python script to convert Friendica templates to smarty: util/friendica-to-smarty-tpl.py
mexon commented 2013-03-21 07:45:06 +01:00 (Migrated from github.com)

Converting to smarty3 is not hard. But how do I use it in my PHP code? Is there an example of a plugin that's already using smarty3 I can copy? The all seem to use the old template system.

Converting to smarty3 is not hard. But how do I use it in my PHP code? Is there an example of a plugin that's already using smarty3 I can copy? The all seem to use the old template system.
ghost commented 2013-03-21 17:22:44 +01:00 (Migrated from github.com)

We use both. A theme decides which template engine it uses, not the addon. If a theme uses smarty. it'll use the templates in addon/addonname/view/smarty3. If the theme uses our internal template engine, it uses the templates in addon/addonname/view. If the smarty templates don't exist, we'll also fall back to the internal engine.

We use both. A _theme_ decides which template engine it uses, not the addon. If a theme uses smarty. it'll use the templates in addon/addonname/view/smarty3. If the theme uses our internal template engine, it uses the templates in addon/addonname/view. If the smarty templates don't exist, we'll also fall back to the internal engine.
mexon commented 2013-03-22 02:56:36 +01:00 (Migrated from github.com)

What's a good example of a theme that uses smarty3 that I can test with?

What's a good example of a theme that uses smarty3 that I can test with?
Sign in to join this conversation.
No description provided.