Plugin: Sobi2


This plugin enables you to insert items (one by one or by a selection on one or several categories) from Sobi2 in your Newsletter.

You can also use this plugin to automatically include your newly created (or modified) Sobi2 items in an Auto-newsletter or a Newsletter.

You can search in all your Sobi2 items and then click on one of the item to include it in your Newsletter.

You can download the Sobi2 plugin on our plugin section then install and publish it like a standard Joomla plugin.


Single Item

Sobi2 Elements

You can use this interface to insert any Sobi2 item in your Newsletter.

Each item can be selected one by one.

  • Display:

    • Title Only: only the title will be inserted

    • Category View: the element will be inserted using the Sobi2 category view

    • Details View: the element will be inserted using the Sobi2 details view

  • Display pictures: You can decide to display or not this picture in your Newsletter or display a resized size of it.

  • Clickable Title: make your title clickable (so linked to your online version) or not.


Sobi2 Categories

You can select one or several Sobi2 categories and AcyMailing will automatically include the Sobi2 items belonging to the selected categories.

  • Maximum Number of Articles: The inserted tag will be replaced by a maximum of X Sobi2 items.

  • Minimum Number of Articles: This option will only be displayed if you access this plugin for a Smart-Newsletter. AcyMailing will only generate your Smart-Newsletter if the minimum number of Sobi2 items found is reached.

  • Filter: This option will only be displayed if you access this plugin for a Smart-Newsletter. You can set a rule so that only newly created or modified Sobi2 items are added to your Newsletter.


Sobi Params

  • Display articles: This parameter enables you to filter the list of Sobi2 items in the tag system

    • All articles: AcyMailing will display all your Sobi2 items

    • Only published articles: AcyMailing will only display your published Sobi2 items

  • Remove javascript: This option enables you to remove any javascript code included in your Sobi2 item as the javascript won't work in most of mail clients.

  • Max picture height / Max picture width : In case of you selected the resized option, AcyMailing will resize your pictures following the specified max height / width.

Customize your Sobi2 item template

Customize your item using some CSS

You can change the styles used for the title and the content area by editing your AcyMailing template.

Edit the AcyMailing template used for your Newsletter and then set some styles:

  • Style for the content area will be used to encompass your Sobi item

  • Style for the content title will be applied to your content title

  • Style for the read more link will be applied to your read more link (if you have one)

  • You can also set the style of all your links using the Link a field

Set styles template



Create your own template

You can also modify the way your Sobi2 item is displayed by creating your own template which will be used to render the Sobi2 item. Please follow those instructions, we don't recommend you to modify the sobi2 plugin directly otherwise your changes will be overwritten when you update AcyMailing.

Create a file in the folder media / com_acymailing / plugins (if the folder does not exists, please create it first). The name of the file should be sobi2.php If this file is available on your server, AcyMailing will use it and won't use the default one.

On this file you can access the element $article (which is the article object loaded from the content table) and the element $tag (which contains the information of the current tag used in your Newsletter)

By default the file should contain:

$result = ''; $styleTitle = ''; $styleTitleEnd = ''; if($tag->type != "title"){ $styleTitle = '<h2 class="acymailing_title">'; $styleTitleEnd = '</h2>'; }
 if(empty($tag->notitle)){ if(!empty($tag->link)){ $result .= '<a href="'.$link.'" '; if($tag->type != "title") $result .= 'style="text-decoration:none" name="sobi2content-'.$article->itemid.'" '; $result .= 'target="_blank" >'.$styleTitle.$article->title.$styleTitleEnd.'</a>'; }else{ $result .= $styleTitle.$article->title.$styleTitleEnd; } }
 //We add the intro text if($tag->type != "title"){ if($tag->type == "intro"){
 if(!empty($tag->pict) AND (!empty($article->icon) OR !empty($article->image))){ $imagePath = ACYMAILING_LIVE.'images/com_sobi2/clients/'.(empty($article->icon) ? $article->image : $article->icon); $result .= '<img src="'.$imagePath.'" style="float:right;margin:5px" />'; } $result .= $this->_displayFields($extraValues,$this->fieldsintro); }else{ //detail view
 if(!empty($tag->pict) AND (!empty($article->icon) OR !empty($article->image))){ $imagePath = ACYMAILING_LIVE.'images/com_sobi2/clients/'.(empty($article->image) ? $article->icon : $article->image); $result .= '<img src="'.$imagePath.'" style="float:right;margin:5px" />'; } $result .= $this->_displayFields($extraValues,$this->fieldsfull); }
 $result = '<div class="acymailing_content">'.$result.'</div>'; }
echo $result;

Last updated