These are chat archives for fansoro/fansoro

28th
Nov 2015
volter9
@volter9
Nov 28 2015 02:29
Omg :laughing:
xxwebplus
@xxwebplus
Nov 28 2015 07:36
@/all Good morning! a quick question: how can I call {block name = name-block} in template?
Sergey Romanenko
@Awilum
Nov 28 2015 08:50
@xxwebplus {Blocks::get('my-block')}
xxwebplus
@xxwebplus
Nov 28 2015 08:56
@Awilum tnx bro!
volter9
@volter9
Nov 28 2015 17:06
How many more plugins remained to do,
*?
@Awilum
Sergey Romanenko
@Awilum
Nov 28 2015 17:48
@volter9 ~17 plugins is left to do until end of this year.
volter9
@volter9
Nov 28 2015 17:49
Hm, I wanna do one. Do you have social share buttons plugin already?
... already
Sergey Romanenko
@Awilum
Nov 28 2015 17:50
volter9
@volter9
Nov 28 2015 17:50
Ok, then I'll do it :)
Sergey Romanenko
@Awilum
Nov 28 2015 17:50
@volter9 good :+1:
volter9
@volter9
Nov 28 2015 18:07
@Awilum does template engine allows to pass arguments in static methods?
Like arrays or strings?
Sergey Romanenko
@Awilum
Nov 28 2015 18:09
@volter9
$template = Template::factory(PLUGINS_PATH . '/plugin_name/templates/');
$template->display('template.tpl', array('var' => $var));
volter9
@volter9
Nov 28 2015 18:13
No, I mean like that:
{Disqus::comments(...)}
Sergey Romanenko
@Awilum
Nov 28 2015 18:14
if you talking about templates, then there is no problems to pass anything to functions or methods
@volter9 yes
volter9
@volter9
Nov 28 2015 18:14
Ok, then, thanks :)
Emoji doesn’t have a normal smile )
Sergey Romanenko
@Awilum
Nov 28 2015 18:16
:sunglasses:
volter9
@volter9
Nov 28 2015 18:18
@Awilum is there a dynamic way to include CSS and JS files in theme?
Like via Config:: or Actions:: ?
Sergey Romanenko
@Awilum
Nov 28 2015 18:19
@volter9
Action::add('theme_header', function () {

});

Action::add('theme_footer', function () {

});
volter9
@volter9
Nov 28 2015 18:20
And then I output CSS’s and JS’s, right?
<link> and <script>
Sergey Romanenko
@Awilum
Nov 28 2015 18:20
yes
volter9
@volter9
Nov 28 2015 18:20
Sweet, thanks
volter9
@volter9
Nov 28 2015 18:21

@volter9

$template = Template::factory(PLUGINS_PATH . '/plugin_name/templates/');
$template->display('template.tpl', array('var' => $var));

Here’s one more question, is $var would be available as {var} in template?

Sergey Romanenko
@Awilum
Nov 28 2015 18:22

yes like

{$var}

inside template

volter9
@volter9
Nov 28 2015 18:22
Thanks :)
Sergey Romanenko
@Awilum
Nov 28 2015 18:22
Fenom syntax like in Smarty
volter9
@volter9
Nov 28 2015 18:24
Where can I find the docs for Fenom?
volter9
@volter9
Nov 28 2015 18:25
Thanks again
volter9
@volter9
Nov 28 2015 18:38
Just wonder, is there i18n support in Morfy?
Sergey Romanenko
@Awilum
Nov 28 2015 18:38
at the moment - no
volter9
@volter9
Nov 28 2015 18:38
Ok, just asking
I finished, I’m going to upload it on github and fork the plugin catalog repo
Sergey Romanenko
@Awilum
Nov 28 2015 18:39
ok good
volter9
@volter9
Nov 28 2015 18:40
Just wonder, is there documentation for plugin's .yml scheme?
I’m about to fork and insert the link, although I have to create release first :)
Sergey Romanenko
@Awilum
Nov 28 2015 18:45
@volter9 :+1:
@volter9 no documetation at the moment, but will be added. at the moment you may check other Morfy plugins and Morfy Plugins boilerplate - https://github.com/pafnuty-morfy-plugins/morfy-plugin-boilerplate
volter9
@volter9
Nov 28 2015 18:47
Well, I quite grapsed the basic idea of morfy plugin
Thanks for plugin examples, btw
volter9
@volter9
Nov 28 2015 19:02
morfy-cms/morfy-plugins-catalog#20
volter9
@volter9
Nov 28 2015 19:10
I don’t understand
When I try to install plugin from zip, it’s not working
When I replace again with the same folder that I’ve been developing in, it’s working
What might be the problem. PHP file named the same as plugin isn’t loading
Some weird s... stuff going on
@Awilum do you know what the problem might be?
Sergey Romanenko
@Awilum
Nov 28 2015 19:14
@volter9 plugins/plugin_name/plugin_name.php
@volter9
for e.g.
plugins/sitemap/sitemap.php
also must be
plugins/sitemap/sitemap.yml
volter9
@volter9
Nov 28 2015 19:15
Yeah, the names are same
Sergey Romanenko
@Awilum
Nov 28 2015 19:16
@volter9 then try to clear cache
volter9
@volter9
Nov 28 2015 19:16
Ok
Sergey Romanenko
@Awilum
Nov 28 2015 19:16
/cache/docrtine/ and /cache/fenom/
volter9
@volter9
Nov 28 2015 19:17
Ok, do I need to remove those folders or remove their content?
Sergey Romanenko
@Awilum
Nov 28 2015 19:17
you may remove this folders, they will automaticly created again
volter9
@volter9
Nov 28 2015 19:17
Ok, I'll try
volter9
@volter9
Nov 28 2015 19:27
Dammit
It wasn’t the cache
it was permission denied
I think you need to throw exception or trigger the error in case if plugin couldn’t be loaded
It's quite confusing, you definitely need to output error in case if plugin couldn't be loaded
Sergey Romanenko
@Awilum
Nov 28 2015 19:32
but its your server configuration...
volter9
@volter9
Nov 28 2015 19:33
I still think that plugins class should inform user if it can't load the plugin
Sergey Romanenko
@Awilum
Nov 28 2015 19:33
@volter9 is there is a possibility to catch in PHP permission denied ? i don't know. catch http headers ?
volter9
@volter9
Nov 28 2015 19:34
I think it's is_readable / is_writable might be the solution
Sergey Romanenko
@Awilum
Nov 28 2015 19:34
okey maybe
volter9
@volter9
Nov 28 2015 19:39
// morfy/Plugins.php:47

// Go through...
foreach ($plugins_list as $plugin) {
    $_plugin = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml';

    if (File::exists($_plugin)) {
        $plugins_cache_id .= filemtime($_plugin);
    }
    else if (!is_readable($_plugin)) {
        throw new Exception("Plugin '$plugin' isn't readable!");
    }
}
This way it’s showing the exception with error that plugins isn’t readable.
I don’t really know what you prefer trigger_error, exceptions or plain die.
Sergey Romanenko
@Awilum
Nov 28 2015 19:41
@volter9 okey, thx will check
volter9
@volter9
Nov 28 2015 19:41

Though, I know that this is my problem, but system should be smart than user.

“Защита от дураков” короче )

Sergey Romanenko
@Awilum
Nov 28 2015 19:42
@volter9 such improvment/solution , then must be general, must be every where...
need to think how to make such improvement for all
maybe users will have same issue with themes for e.g..
volter9
@volter9
Nov 28 2015 19:43
Indeed
Sergey Romanenko
@Awilum
Nov 28 2015 19:43
but, normal hostings as I know resolve such issues with folders automaticly
I never have such problems on hostings :sunglasses:
volter9
@volter9
Nov 28 2015 19:43

Yeah…

Но у меня руки не всегда прямые, как видишь )

Sergey Romanenko
@Awilum
Nov 28 2015 19:44
@volter9 ubuntu ?
volter9
@volter9
Nov 28 2015 19:44
OS X
No, I’m just not really a good system admin
Sergey Romanenko
@Awilum
Nov 28 2015 19:44
so I also have this on my Ubuntu
volter9
@volter9
Nov 28 2015 19:44
This issue?
Sergey Romanenko
@Awilum
Nov 28 2015 19:44
but I leave with it :smile:
volter9
@volter9
Nov 28 2015 19:45
Well, I solved this issue by chmoding 777
Sergey Romanenko
@Awilum
Nov 28 2015 19:45
its problem of my ubuntu
volter9
@volter9
Nov 28 2015 19:45
Oh, I get it, you wanted to write ‘live’ with it
Sergey Romanenko
@Awilum
Nov 28 2015 19:45
yes, I am also use chmod to resolve such issues localy
but everything is ok on LIVE - always :)
volter9
@volter9
Nov 28 2015 19:46

but I leave with it :smile:

Oh, I get it, you wanted to write ‘live’ with it

I mean that :)

Well, it was quite fun and easy to create a plugin for Morfy, thanks )
Sergey Romanenko
@Awilum
Nov 28 2015 19:50
:+1:
@volter9 I see that use bower for your plugin, https://github.com/volter9/morfy-plugin-likely
@volter9 please add instructions in readme for users about installing dependencies with bower for your plugin
oh... I see that you have added dowloaded libs inside release build - https://github.com/volter9/morfy-plugin-likely/releases/download/0.0.1/likely.zip, its good :)
volter9
@volter9
Nov 28 2015 19:56
Well, I don't really like to pollute repos with third party/vendor packages
That's why I build it myself and upload in release
Thanks :)
Sergey Romanenko
@Awilum
Nov 28 2015 19:57

I don't really like to pollute repos with third party/vendor packages

its ok

i think the same about morfy default theme, but don't use bower yet for this
volter9
@volter9
Nov 28 2015 19:58
Well, discovering thing like bower is fun, I don't want to ruin that fun for new coming users ;)
Sergey Romanenko
@Awilum
Nov 28 2015 20:35
@/all :snowflake: :snowflake: :snowflake: Snowflake generator plugin for Morfy allow to generate snow for any element on your page. https://github.com/morfy-cms/morfy-plugin-snowflake - release :)
Snowflake
volter9
@volter9
Nov 28 2015 20:38
:+1:
Moncho Varela
@nakome
Nov 28 2015 23:17
Gallery plugin Second preview almost finished