Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/29/2018 in all areas

  1. Hello All Blestars. we are happy to announce the release of our new wanted plugin, Notification Center. this plugin will allow admin to set wish action/event he should alerted by in some apps . the plugin is modular and can accept more apps in the future, any developer can write it own app inside the plugin, is totally easy, just check one of our ready app like slack . at the moment the plugin is in beta and testing period, we have add only 2 apps now (Slack Via API token, and Slack via Webhooks) . Apps Added Until Now : Slack Via API token Slack via Webhooks Alert Popup Notification (Dashboard) Telegram Pushover Hipchat Discord Onesignal (Soon) Slack Notifiactions Dashboard Notifications Telegram Notifications this plugin requiere the VIP (Gold) subscription . Order Link as always the installtion steps is : 1 - download the file from client area . 2 - upload the notification folder inside plugin directory . 3 - goto plugins , and install Notification Center. 4 - enjoy the content .
    1 point
  2. NextToNothing

    Twig?

    Hey All, Coming from a background in developing with Symfony, I've used Twig a lot. Also used templating engines such as smarty and mustache/handlebars - but I believe Twig to be the better of the bunch. I've seen there was a little discussion about Twig in late 2016 and mid 2017. However, I thought it might be a nice idea to have a constructive discussion about Twig and Blesta? Even if the end decision was not to use Twig, the discussion might help improve the templating system. Most notably for new-comers to Blesta from competitors or a background like mine (Symfony/Twig or Laravel/Blade). I'll start off with a few points: Conciseness Personally, I believe Twig to be more easy to read and follow the logic, given it's brevity. Also, since it uses braces ({}) and not angled brackets (<>), it helps give a contrast between template code and the actual HTML. All this helps readability, which can speed up development and maintainability. Arguably, the same could be achieved in PHP via short tags like <? ?> and <?=$var?> - but I believe you may need to enable them in PHP, which is probably why Blesta isn't using them already (given the self-hosted nature). <div class="row<?php echo (!$this->Html->ifSet($show_header, true) ? ' login' : '');?>"> <?php if (!empty($active_nav['secondary'])) { ?> <div class="col-md-3"> <div class="list-group"> <?php foreach ($active_nav['secondary'] as $link => $value) { ?> <a href="<?php $this->Html->_($link);?>" class="list-group-item borderless left-nav <?php echo ($value['active'] ? 'active' : '');?>"> <i class="<?php $this->Html->_($value['icon']);?>"></i> <?php $this->Html->_($value['name']); ?> </a> <?php } ?> </div> </div> <div class="col-md-9"> <div class="row"> <?php echo $content;?> </div> </div> <?php } else { echo $content; } ?> </div> versus... <div class="row{% if not show_header %} login{% endif %}"> {% if active_nav.secondary is not empty %} <div class="col-md-3"> <div class="list-group"> {% for link, value in active_nav.secondary %} <a href="{{ link|e }}" class="list-group-item borderless left-nav {% if value.active %}active{% endif %}"> <i class="{{ value.icon|e }}"></i> {{ value.name|e }} </a> {% endif %} </div> </div> <div class="col-md-9"> <div class="row"> {{ content }} </div> </div> {% else %} {{ content }} {% endif %} </div> (I didn't test this Twig code, just to confirm) Control Structure Syntax This kind of comes into conciseness, but is only really for PHP. It might be beneficial to use the alternative syntaxes, instead of braces {} in the pdt templates. It would certainly help me get less confused when reading large chunks http://php.net/manual/en/control-structures.alternative-syntax.php IDEs I use PHPStorm, and it has features for Twig, such as better highlighting, auto-completes, etc. With pdt templates being literally PHP, I had to just set them to plain-ol' PHP files - meaning no helpers from the IDE that can speed up development. Inheritance, blocks I think this is probably quite a big point, as blocks are more-or-less how the templating engine in Blesta works - except it's all in the core code. Again, it helps readability - given that from just the template file, I know all of the templates that are gonna be executed. As an example, it can also be useful if someone wanted to change other code on specific pages. In Twig, I'd be able to edit just the one template file - however, with the current system, I'd have to edit core files, which would end up being a pain with upgrades overwriting the files. {% extends "structure.html" %} {% block content %} <b>Content of the page...</b> {% endblock %} opposed to just having a file on it's own with the page content, and having to rely on the core code to define everything else: <b>Content of the page...</b> Extensibility Obviously, PHP is PHP, and you can do what you like with creating functions etc (however, loading them into the template engine is probably another dicussion). Twig is very versatile in the respect. For example, phpBB made the switch from their own engine to Twig, and was able to code extensions to Twig to allow all their old templates to run under Twig. https://www.phpbb.com/community/viewtopic.php?f=461&t=2424606 Everything else over on the Twig homepage -https://twig.symfony.com/ Obviously, it'll involve a bit of work to move over to Twig, but I feel it would be beneficial in the long run, help new-comers, and more importantly help grow the development of themes for Blesta. Given Blesta has a template engine orchestrating everything, I might have a little play around with integrating it myself. ? Hopefully we get a good discussion going on the topic? sidenote - I noticed that templates for plugins can't get overwritten in the app/views/ directory? Thought this was a bit odd, given that most template files have a unique name. So, could we possibly check the app/views/ first before going back to the plugin default. Personally, I wanted to edit a template file in the support_manager plugin but keep all my theme files in one central location (with Git). Unfortunately, I think that I might have to end up with template files here there and everywhere? :S
    1 point
  3. Easter is a time to celebrate life as we are reminded of what is really important. Let this beautiful time of tranquility and enjoyment fill your home and heart with hope, optimism, and sense of purpose for the rest of your days! Warmest wishes to you and your relatives from the entire ModulesGarden crew!
    1 point
  4. Mainly from the client's perspective, I may just do a header and footer for now, but I'd like to try customize the theme. I was thinking maybe the main order page could be horizontal blocks similar to the blocks on the front page, But the default order page looks neat the way it is, vertical, I just don't have many packages to fill that page yet. It might be good for some people to have the option to choose a few different styles for the order page. I'll try mess around with the code, or I may have to buy a custom theme.
    1 point
  5. Jonathan

    Namesilo Plugin

    Here's the code for that: https://github.com/NETLINK/Blesta-Namesilo/pull/15 It should make it into master in the next few days once @NETLINK approves the pull.
    1 point
  6. Jonathan

    Namesilo Plugin

    Stick a request on github under issues and I'll look into it. I've been actively contributing code I'm just waiting on @netlink to accept my pull requests.
    1 point
×
×
  • Create New...