13 Jul 2018

feedeZ News

The Week in Review: eZ Platform 2.2.1, Facilitating Migration and More

News

eZ Platform 2.2.1 available

eZ Platform 2.2.1 has been made available. This release includes several bug fixes for our most recent Fast Track Release, eZ Platform v2.2. You can view the changelog on GitHub.

Facilitating the migration path to eZ Platform

In conjunction with the release of eZ Platform 2.2.1, we released ezplatform-xmltext-fieldtype 1.6.0. This package notably contains the XmlText to RichText converter for migrating to eZ Platform's RichText format.

This release includes several improvements, further facilitating and improving the migration path to eZ Platform. Full details are available on GitHub.

Discover eZ Platform v2.2

Learn more about eZ Platform v2.2, our summer release in a recording of the Webinar accompanying this release. This release includes both major and small improvements. Recently documented is one of these small improvements, setting the pagination limit in Admin UI.

Local Meetups

There is an interest by the Community to organize an eZ Meetup in London (UK). If you are interested in this, do leave a messages in the Slack thread.

If you want to help organize, or just attend. If you have ideas, or think we should link up with existing Symfony or PHP Meetups in the area, we would love to hear from you.

Winner of the eZ Connector May Competition

"We wish that all could win! However, like the World Cup, only one can be left to raise the eZ Connector trophy. The winner of the eZ connector May competition is the Mailchimp connector. MailChimp is an email marketing solution that allows you to build customizable email campaigns as well as automate your email marketing initiatives. Emmanuel, who is working as a senior consultant at our partner Smile, developed the connector on his personal time (and name)."

Read the full announcement on our Blog. This announcement also includes a demo video and news about two more connectors.

In Other News:

Social Media

Das Team von #eZ wünscht allen eine schöne #Sommerzeit und #Sommerurlaub! Genießt die #Sonne so wie unser Maskottchen #Pulley. Erfahrt hier mehr zu Pulley: https://t.co/mxphKIXNhF #holiday #friday #summer pic.twitter.com/QqQKNX6y9d

- eZ Systems DE (@eZSystemsDE) July 13, 2018

Today is a very special day. We're celebrating 20 years of #Sensio (@SensioGrey, @SensioLabs, @Blackfireio and @Symfony). Tonight, 600 people (employees, alumni, and people who made this journey possible) will join @sensiogreg and me on Paris's biggest green rooftop. Exciting!

- Fabien Potencier (@fabpot) July 4, 2018

Looks like something is coming up for EzCoreExtraBundle! https://t.co/HtyhvNoXne #ezplatform #emailAuthentication

- Jérôme Vieilledent (@jvieilledent) July 12, 2018

Save the date: next #meetup at #Cologne #Office in #September. More in our #meetup group: https://t.co/UMPBnpsnmw - hope to see you there & to find out what is new in #eZPlatform v2.3! pic.twitter.com/1j8CXqPtp1

- eZ Systems DE (@eZSystemsDE) July 10, 2018

Follow us on Twitter, Facebook, LinkedIn, Google+, or YouTube, and join our Community for any help with eZ Platform or community-related questions.

Find eZ at These Events

For more events, make sure to check out this list.

Each week we publish a roundup of highlights from the eZ ecosystem. If you have any news or events to share, please contact me.

(Lead image credit: Thomas Hawk, CC)

13 Jul 2018 4:52pm GMT

Winner of the eZ Connector May Competition

We wish that all could win! However, like the World Cup, only one can be left to raise the eZ Connector trophy. The winner of the eZ connector May competition is with the Mailchimp connector. MailChimp is an email marketing solution that allows you to build customizable email campaigns as well as automate your email marketing initiatives. Emmanuel, who is working as a senior consultant at our partner Smile, developed the connector on his personal time (and name). As the winner of the competition, Emmanuel will receive $2,500 and an additional $5,000 prize if he is able to build an additional connector in the "Build with eZ" phase.

The MailChimp connector provides a range of cool features that seamlessly integrate eZ Platform with MailChimp. A few notable features are:

Click here to view a demo of the connector and to learn more about its capabilities.

In addition to the MailChimp connector, we had two other connectors that are a great addition to eZ Platform:

Creemedia created a Contentbird connector. Contentbird is a content marketing platform where you can create optimized content for your website.

The connector lets you sync the content from Contentbird to eZ Platform and vice versa. For example, choose which of your eZ Platform user is the author of the article, which type of content should be created and in which category the content should be placed. The package is open source and available on Github: https://github.com/creemedia/eZcontentbirdBundle.

Watch the video below to learn more about the eZ Contentbird Connector capabilities:

Another connector in the running was inwebco's Google Analytics (GA) connector. The connector lets editors and administrators of eZ Platform access the web analytics from GA directly within eZ Platform user interface. The connector adds a new tab on the administrator interface and makes it possible to view further information from Google Analytics without having to access the Google Analytics application.

To learn more, read this blog post.

As a reminder, the eZ Connector Marketplace expansion program was launched this past February at eZ's Barcelona partner meeting. The eZ Connector initiative consists of two programs: eZ Connector Competition and Build with eZ. These programs are an opportunity for partners, developers, and third-party software vendors to build connectors that extend eZ Platform's capabilities.

The next competition will kick off on August 1st. Registration for next month's competition is already open.

REGISTER HERE NOW

Copyrights and intellectual property requirements: The connectors must be open source and follow the GPL license (version 2). For the eZ Connector Competition phase, participants are welcome to host the codebase of the connector anywhere, be it on their personal Github repository or their company Gitlab account. We, however, ask that they grant eZ Systems with the right to use the connector following the eZ Contribution License Agreement (CLA) , During the Build with eZ phase, the participant must agree on the same CLA, and, as it will be a collaboration with eZ Systems, we ask the codebase of the connector be hosted on eZ Systems GitHub organization (https://github.com/ezsystems/). eZ Systems will create a dedicated repository for it when launching the phase. To learn more visit our Build a Connector for eZ page.

13 Jul 2018 2:49pm GMT

02 Jul 2018

feedshare.ez.no > All forums (topics and replies)

Re: Custom attribute for tag with image.tpl

Got it !!!

extension/ebb/design/ebb/override/templates/embed/image.tpl

  {attribute_view_gui attribute=$object.data_map.image image_class=$object_parameters.size href=$link_parameters.href|ezurl target=$link_parameters.target}

Just add

  link_parameters=$link_parameters

02 Jul 2018 3:49pm GMT

Re: Custom attribute for tag with image.tpl

extension/ebb/design/ebb/templates/content/datatype/view/ezxmltags/link.tpl

Works fine, as long as a link is applied to a string only.

 ezurl('no')}"
        {if is_set($onclick)}   onclick="{$onclick}"    {/if}
        {if is_set($rel)}       rel="{$rel}"            {/if}
        {if is_set($atinternet_name)}       data-atinternet_name="{$atinternet_name}"            {/if}
        {if is_set($atinternet_advertising)}       data-atinternet_advertising="{$atinternet_advertising}"            {/if}
        {section show=$id} id="{$id}"{/section}
        {section show=$title} title="{$title}"{/section}
        {section show=$target} target="{$target}"{/section}
        {section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}
    >
    {$content}

However, when a is applied to an image in xml content attribute, the tag is rendered by image.tpl rather than by link.tpl.

extension/ebb/design/ebb/templates/content/datatype/view/ezimage.tpl

 {*
@param eZContentObjectAttribute $attribute
@param string $image_class
@param string $css_class
@param string $alignment
@param bool   $link_to_image    Est ce que l'image affichée doit être un lien vers l'image originale. Si oui: écrase le href passé en paramètre.
@param string $href             URL du lien !!! AVEC les boubles-côtes !!!!
@param string $target
@param string $link_class
@param string $link_id
@param string $hspace
@param string $border_size
@param bool   $map
@param string $legende
*}
 
{$link_parameters|attribute(show,1)}{* Unknown template variable 'link_parameters' in namespace 'xmltagns:ContentView:ContentAttribute' *}
 
{if ezini( 'SiteSettings', 'SiteURL' )|contains('http://')}
    {def $site_url=ezini( 'SiteSettings', 'SiteURL')}
{else}
    {def $site_url=concat('http://', ezini( 'SiteSettings', 'SiteURL' ))}
{/if}
{default image_class=large
         css_class=false()
         alignment=false()
         link_to_image=false()
         href=false()
         target=false()
         hspace=false()
         border_size=0
         map=false()}
 
{let image_content=$attribute.content}
 
{section show=$image_content.is_valid}
 
    {let image=$image_content[$image_class]}
 
    {section show=$link_to_image}
        {let image_original=$image_content['original']}
        {set href=$image_original.url|ezroot}
        {/let}
    {/section}
    {switch match=$alignment}
    {case match='left'}
        
{/case} {case match='right'}
{/case} {case/} {/switch} {section show=$css_class}
wash}"> {/section} {def $texte_alternatif = ''} {if is_set($image.text)} {set $texte_alternatif = $image.text|strip_tags()|xmlwash()} {/if} {if is_set($legende)} {set $texte_alternatif = $legende|strip_tags()|xmlwash()} {/if} {section show=and( is_set( $image ), $image )} {section show=$href} {$href} {section show=and( is_set( $link_class ), $link_class )} class="{$link_class}"{/section} {section show=and( is_set( $link_id ), $link_id )} id="{$link_id}"{/section} {section show=$target} target="{$target}"{/section} > {/section} concat($site_url,$image.url|ezroot(no))}" width="{$image.width}" height="{$image.height}" {section show=$hspace}hspace="{$hspace}"{/section} style="border: {$border_size}px;" alt="{$texte_alternatif}" title="{$texte_alternatif}" {if $map} usemap="#map"{/if} /> {section show=$href} {/section} {/section} {section show=$css_class}
{/section} {switch match=$alignment} {case match='left'}
{/case} {case match='right'}

    {/case}
    {case/}
    {/switch}
 
    {/let}
 
{/section}
 
{/let}
 
{/default}

02 Jul 2018 3:27pm GMT

Custom attribute for tag with image.tpl

I have exactly the same problem as Don Ronaldo in his message: "Custom attribute for tag with image.tpl"

http://share.ez.no/forums/setup-design/custom-attribute-for-link-tag-with-image.tpl

Except my variable $link_parameters doesn't exist...

eZ Publish version 4.0.1

02 Jul 2018 3:25pm GMT

29 Jun 2018

feedeZ News

The Week in Review: eZ Platform 2.2, Internationalization and More

News

eZ Platform 2.2.0 available

The summer release of eZ Platform v2.2 has arrived! This release introduces features such as page builder, bookmarks, roles and permissions and much more that benefits editors, website administrators and developers. Read the full announcement on our blog.

eZ Platform v2.2 is available on ezplatform.com and via composer update. eZ Platform Enterprise Edition v2.2 is available for customers in their support portal. eZ platform Enterprise Edition v2.2 is available as a trial for partners in the partner portal. It is of course also available on eZ Platform Cloud. To see the full list of our new features, check out our release notes as well as the link to the list of changes on Github for open source and enterprise edition.

Join us on July 3rd (Webinar), 2018 at 10:00am ET/ 3:00pm CET as Product Marketing Manager, Amit takes us on a tour of eZ Platform v2.2.

eZ Platform internationalization

With the introduction of the localization feature in eZ Platform 2.2, you can now contribute to an existing translation or create an entirely new translation, if need be. If you'd like to take part in this effort, consider signing up with Crowdin, a simple service that offers a very helpful in-context translation interface. Feel free to contribute to our efforts here: https://crowdin.com/project/ezplatform. You can find documentation on ezplatform.com and GitHub.

Big thanks to all contributors. The 2.2.0 i18n packages have been deployed. We have 10 languages above 50%:

More translations are of course available, you can check them on the Crowdin project.

Note on Symfony 3.4.12

We have received a few messages where a Composer update brings your Symfony install to 3.4.12, causing small problems. One example results in an infinite login loop. You can read about that on Slack. The Symfony 3.4.12 version has been added to the 'conflict' section of 'package.json' for eZ Platform.

In Other News:

Resources

New Bundles

Emmanuel Drouet share another bundle through his 'One Monday One Bundle' effort, the eZ Platform UI Tree content browse menu bundle. This bundle is available on Packagist, you can watch a demo on YouTube.

Gaetano Giunta shared the Abacus Advance Bundle by Kaliop. This bundle is also available on Packagist.

Question of the Week

Carlos Revillo: Do we have something similar in eZ Platform v2 to "RemoveSiteAccessIfDefault" which was available in Legacy? Edi Modrić provided a working example which you can check on our Slack Workspace.

Looking for a bundle compatible with eZ Platform? Check out: https://ezplatform.com/Bundles.

Social Media

Ein #Tourismusportal ist keine News-Seite: der #Content muss langfristig attraktiv bleiben. In unserem Projekt mit der Landeshauptstadt #München haben wir den Fokus deshalb auf smartes und agiles #ContentManagement gelegt. @eZSystemsDE https://t.co/YNXAL7B1j6

- ARITHNEA GmbH (@ARITHNEA) June 22, 2018

Follow us on Twitter, Facebook, LinkedIn, Google+, or YouTube, and join our Community for any help with eZ Platform or community-related questions.

Find eZ at These Events

For more events, make sure to check out this list.

Each week we publish a roundup of highlights from the eZ ecosystem. If you have any news or events to share, please contact me.

(Lead image credit: Edward and Caroline, CC)

29 Jun 2018 4:08pm GMT

12 Nov 2011

feeddrupal.org aggregator

Drupal core announcements: Core's directory structure reorganized

As of 2011-11-01, most files in Drupal core live in a 'core' subdirectory. We did this to make it easier to tell what's core vs. site-specific code (e.g. to discourage people from installing modules into the 'modules' subdirectory in the webroot) and to make it easier to upgrade to newer versions. See #22336: Move all core Drupal files under a /core folder to improve usability and upgrades for the full story and/or the API change record: Most Drupal core files now live in a "core" subdirectory.

One of the only drawbacks of this change is that bug fix patches for Drupal 7 no longer apply to Drupal 8 without being rerolled. However, generally it's easy re-roll a patch in this situation. xjm wrote up detailed instructions for re-rolling patches here: http://xjm.drupalgardens.com/blog/rerolling-drupal-8-core-patches

A more simple (but less effective in some cases) way to re-roll was written up by scor over at comment #306 of the original issue.

Please don't reopen the original issue with follow-up suggestions or bug reports -- those belong in new issues.

Core

12 Nov 2011 8:39am GMT

11 Nov 2011

feeddrupal.org aggregator

Morbus Iff: Achievements 7.x-1.4: Using print render($a) and render arrays

The Drupal Achievements module offers the ability to create achievements and badges similar to systems seen on Xbox 360, Playstation 3, Foursquare, Gowalla, GetGlue, and more. For a Drupal site, this could mean commenting a certain number of times, starting a forum topic, visiting the site every day of the week, or anything else that can be tracked and coded. The recently released 7.x-1.4 update focuses on changes that make theming easier.

In my first post about #theme_wrappers, we fixed up bad HTML in #prefix and #suffix to give themers an easier time. This post, about render arrays, is no different. In fact, most of the tweaks in Achievements 7.x-1.4 are not very obvious, or even useful, to module developers. It's only when you sit down with a themer who wants to change the entire look and feel that you realize your carefully-coded "looks good in Garland!" output is not as useful as you think.

Why render arrays are better

You've probably read about render arrays in the Drupal Developer's Handbook already, but the documentation doesn't really give a developer a decent reason why they should use them. It also doesn't talk about $content or splitting your variables into "data" and "presentation". I'll cover both below.

First, let's look at the wrong approach:

    $build['image'] = theme('image', array('path' => array('misc/druplicon.png')));

If this was passed to a theme file, the themer would simply print $image; and be done with it. The themer could even link the image if they wanted, but they wouldn't be able to add any classes or attributes to the image, since calling theme() directly always returns rendered HTML. Here's what the above looks like as a render array:

    $build['image'] = array(
      '#theme' => 'image',
      '#path' => 'misc/druplicon.png',
    );

To get this to display in the theme, we'd use print render($image); instead. In this case, the theme is telling Drupal to render the HTML, not your module. Why is this important? Ignoring the nebulous "I CAN'T ADD CSS CLASSES, SNIFF!" themer lament, consider the following small tweak to our original bad example:

    $image = theme('image', array('path' => array('misc/druplicon.png')));
    $build['image'] = l($image, 'node', array('html' => TRUE));

Here, we've simply added a link to our dummy image and the themer gets the fully rendered HTML to print out. Everything is toasty... unless the client or theme doesn't want or need the image to be linked. The themer now has no choice: they either have to use a regular expression to strip out the unwanted link or they have to recreate the $image variable in his own, well, image. Not only is that fragile (it's essentially copying module code to the theme and that code might change in a future version), but it also mixes too much logic with too little presentation. If the image's path isn't available to the theme as its own variable (it isn't, in the above example), the themer will still have to parse your rendered HTML to find the image's path first. Yuck.

Let's convert the above to a render array:

    $build['image'] = array(
      '#theme' => 'image_formatter',
      '#item' => array(
        'uri' => 'misc/druplicon.png',
      ),
      '#path' => array(
        'path' => 'node',
        'options' => array('html' => TRUE),
      ),
    );

Now, if the themer wants to remove the link, they can listen in a theme override, a preprocess, or even the dreaded hook_page_alter() and simply unset($variables['image']['#path'])'. No more link, without duplicating any upstream code or recreating things themselves. This is a real-life example, by the way - I just finished an optional submodule of Achievements which removes all links to the default leaderboards. I couldn't have easily done that if I used either of the link approaches below:

    $build['achievement_title'] = l($title, 'path/to/achievement');
    $build['achievement_title']['#markup'] = l($title, 'path/to/achievement');

But with the following render array:

    $build['achievement_title'] = array(
      '#type' => 'link',
      '#title' => $title,
      '#href' => 'path/to/achievemnt',
    );

I can make those links linkless:

  unset($variables['achievement_title']['#type']);
  $variables['achievement_title']['#markup'] = $variables['achievement_title']['#title'];

Data, presentation, and $content['a'] not $a

This doesn't mean that every single variable you pass to the theme should be a render array: there's clearly a difference between variables that represent data (an image path, the $node or $user object, a Unix timestamp, etc.) and variables that are meant for presentation (the linked image, the node's filtered teaser, a human-readable date, etc.).

There's a move afoot to more clearly indicate these two types by using a $content variable as a container for all the supplied render arrays. Drupal core does this in some places (node.tpl.php, for one), but not all, and it's slowly becoming a preferred practice in the theming world. Another benefit is the ability to use print render($content);, which says "render everything I haven't already rendered", allowing themes to display things that they, or the parent module, might not know about (new data added by a third party module in a preprocess, etc.). I've yet to implement this in Achievements, but I'll likely get there for the next release.

11 Nov 2011 6:57pm GMT

Trellon.com: Looking ahead to Drupalcon Denver

With each week that DrupalCon Denver is coming nearer, the excitement in the community grows. At Trellon, we're not immune to that excitement, and we're proud to be a Platinum sponsor of Drupalcon Denver. We're looking forward to seeing members of the Drupal community there, both old friends and new. We're excited about the opportunity that Drupalcons give us not only to learn more about the direction of Drupal, but to help shape it. We're eager to learn what new and exciting things people around the world have been doing with Drupal.

read more

11 Nov 2011 6:00pm GMT

09 Nov 2011

feedPlanet Zope.org

Updated MiniPlanet, now with meta-feed

My MiniPlanet Zope product has been working steady and stable for some years, when suddenly a user request came along. Would it be possible to get a feed of all the items in a miniplanet? With this update it became possible. MiniPlanet is an old-styl...

09 Nov 2011 9:41am GMT

07 Nov 2011

feedPlanet Zope.org

Welcome to Betabug Sirius

It has been quite some time that I announced_ that I'd be working as a freelancer. Lots of stuff had to be done in that time, but finally things are ready. I've founded my own little company and set up a small website: Welcome to Betabug Sirius!

07 Nov 2011 9:26am GMT

03 Nov 2011

feedPlanet Zope.org

Assertion helper for zope.testbrowser and unittest

zope.testbrowser is a valuable tool for integration tests. Historically, the Zope community used to write quite a lot of doctests, but we at gocept have found them to be rather clumsy and too often yielding neither good tests nor good documentation. That's why we don't use doctest much anymore, and prefer plain unittest.TestCases instead. However, doctest has one very nice feature, ellipsis matching, that is really helpful for checking HTML output, since you can only make assertions about the parts that interest you. For example, given this kind of page:

>>> print browser.contents
<html>
  <head>
    <title>Simple Page</title>
  </head>
  <body>
    <h1>Simple Page</h1>
  </body>
</html>

If all you're interested in is that the <h1> is rendered properly, you can simply say:

>>> print browser.contents
<...<h1>Simple Page</h1>...

We've now ported this functionality to unittest, as assertEllipsis, in gocept.testing. Some examples:

self.assertEllipsis('...bar...', 'foo bar qux')
# -> nothing happens

self.assertEllipsis('foo', 'bar')
# -> AssertionError: Differences (ndiff with -expected +actual):
     - foo
     + bar

self.assertNotEllipsis('foo', 'foo')
# -> AssertionError: "Value unexpectedly matches expression 'foo'."

To use it, inherit from gocept.testing.assertion.Ellipsis in addition to unittest.TestCase.


03 Nov 2011 7:19am GMT

13 Oct 2011

feedshare.ez.no > Articles and Tutorials

Building native mobile applications with the eZ Publish REST API

eZ Publish is a Web Content Management System that provides a platform to publish content via any channel. Its powerful presentation engine enables you to create websites and pages that display your content in a variety of renderings. Its powerful API directly and simply integrates your content with any web-enabled application on any device, such as the iPad, iPhone, or an Android device, without ever interfering with, or impacting the platform itself.

At the end of this tutorial, you will have learnt the basics of mobile application development for both iOS and Android platforms, consuming content from eZ Publish. CMS-side adjustments for the mobile channel will be acquired too. This cheatsheet will help you leverage the multichannel capabilities of eZ Publish, and its REST API in future projects, in a more systematic fashion.

13 Oct 2011 2:21pm GMT

16 Aug 2011

feedshare.ez.no > Articles and Tutorials

Image Maps in ezwebin Banners

Beginners guide for learning how to use image maps in the ezwebin extension.

16 Aug 2011 12:40pm GMT

07 Jul 2011

feedshare.ez.no > Articles and Tutorials

Building mobile browser and hybrid applications with eZ Publish

eZ Publish is a Web Content Management System that provides a platform to publish content via any channel. Its powerful presentation engine enables you to create websites and pages that display your content in a variety of renderings. Its powerful API directly and simply integrates your content with any web-enabled application on any device, such as the iPad, iPhone, or an Android device, without ever interfering with, or impacting the platform itself.

At the end of this tutorial, you will have learnt the basics of mobile application development for both iOS and Android platforms, consuming content from eZ Publish. CMS-side adjustments for the mobile channel will be acquired too. This cheatsheet will help you leverage the multichannel capabilities of eZ Publish, and its REST API in future projects, in a more systematic fashion.

07 Jul 2011 1:29pm GMT