Full Trust European Hosting

BLOG about Full Trust Hosting and Its Technology - Dedicated to European Windows Hosting Customer

European Drupal 7.39 Hosting - HostForLIFE.eu :: How to Use Rules to Send HTML Emails

clock August 24, 2015 10:45 by author Rebecca

In this tutorial, you'll learn how to use Mime Mail to configure Drupal to send HTML emails. We'll also look at how to send them using Rules.

Let's begin by downloading a few modules. Go ahead and download Rules, Entity API, Mime Mail and Mail System. If you prefer Drush, run the following command:

drush dl rules entity mimemail mailsystem

Once everything has been downloaded, enable Mail System, Mime Mail, Rules and Rules UI.

Step 1 - Configure Mail System

Go to Configuration, "Mail System" and make sure that MimeMailSystem has been selected in the "Site-wide default MailSystemInterface class" and "Mime Mail module class" drop-down list.

Step 2 - Configure Mime Mail

Now, head over to Configuration and click on "Mime Mail". From this page you can change a few of the module's configuration options. The one we're interested in, for now, is the "E-mail format".

Change it from "Plain text" to "Filter HTML". This means that when emails are sent they'll be filtered by the "Filter HTML" text format.

At this point, you should be able to send HTML emails. If certain tags are being filtered out, make sure that the text format selected in "E-mail format" allows the tags.

How to Send HTML Emails using Rules

Mime Mail integrates beautifully with Rules. The module implements two custom actions: "Send HTML e-mail" and "Send HTML mail to all users of a role". As you may have guessed, both actions allow you to send emails as HTML.

I won't go through the process of creating a basic rule. I'll assume you've already created one. So go and edit a rule that will send an email. Click on "Add action" and select "Send HTML e-mail" or "Send HTML mail to all users of a role" from the drop-down list.

As you can see, sending HTML emails from Drupal is not that hard. However, if you're emails are still being sent as plain text and you have a lot of modules installed start reviewing your existing setup. Occasionally, a module might change some mail setting that prevents an email from being sent as HTML.

HostForLIFE.eu Drupal 7.39 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



Umbraco 7.2.8 Hosting France - HostForLIFE.eu :: How to Use Standard Conventions to Create Simple Costum Tree

clock August 21, 2015 07:22 by author Rebecca

This article will explain how to create a simple custom tree an angular editor & dialog using standard conventions. This article doesn't go into detail about how to persist data in your editors, it is a simple tutorial defining how routing interacts with your views and where your views need to be stored.

So all the steps we will go through:

  •     Creating a tree with a menu item
  •     Create an editor
  •     Create a dialog for the menu item

Create a Tree

Step 1

First you need to define a tree class that inherits from Umbraco.Web.Trees.TreeController:

public class MyCustomTreeController : TreeController
{
}

The name of your tree must be suffixed with the term 'Controller'.

Step 2

Next we need to add some attributes to the tree. The first one defines the section it belongs to, the tree alias and it's name. Ensure your tree alias is unique, tree aliases cannot overlap.

[Tree("settings", "myTree", "My Tree")]

The 2nd attribute does 2 things - Tells Umbraco how to route the tree and tells Umbraco where to find the view files. This attribute is not required but if you do not specify it then the view location conventions will not work.

[PluginController("MyPackage")]

There are 2 methods that need to be overriden from the TreeController class: GetTreeNodes & GetMenuForNode. This example will create 3 nodes underneath the root node:

protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
{
    //check if we're rendering the root node's children
    if (id == Constants.System.Root.ToInvariantString())
    {
        var tree = new TreeNodeCollection
            {
                CreateTreeNode("1", queryStrings, "My Node 1"),
                CreateTreeNode("2", queryStrings, "My Node 2"),
                CreateTreeNode("3", queryStrings, "My Node 3")
            };               
        return tree;
    }
    //this tree doesn't suport rendering more than 1 level
    throw new NotSupportedException();
}

Step 3

Next we'll create a menu item for each node, in this case its a 'Create' menu item

protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
{
    var menu = new MenuItemCollection();
    menu.AddMenuItem(new MenuItem("create", "Create"));
    return menu;
}


That's it, the whole tree looks like this:

[Tree("settings", "myTree", "My Tree")]
[PluginController("MyPackage")]
public class MyCustomTreeController : TreeController
{
    protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
    {
        //check if we're rendering the root node's children
        if (id == Constants.System.Root.ToInvariantString())
        {
            var tree = new TreeNodeCollection
            {
                CreateTreeNode("1", queryStrings, "My Node 1"),
                CreateTreeNode("2", queryStrings, "My Node 2"),
                CreateTreeNode("3", queryStrings, "My Node 3")
            };
            return tree;
        }
        //this tree doesn't suport rendering more than 1 level
        throw new NotSupportedException();
    }
    protected override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
    {
        var menu = new MenuItemCollection();
        menu.AddMenuItem(new MenuItem("create", "Create"));
        return menu;
    }
}

Create an Editor

An editor is simply an angular view (html file) so you can really do whatever you'd like! This tutorial will simply create a hello world editor showing the id of the item being edited.

Create a controller

First thing we'll do is create an angular controller for the editor, this controller will be contained in a file found beside the view - the file naming conventions are based on the controller file naming conventions in the Umbraco core.

/App_Plugins/MyPackage/BackOffice/MyTree/mypackage.mytree.edit.controller.js

The controller is super simple, at it is going to do is assign a property to the $scope which shows the current item id being edited:

'use strict';
(function () {
    //create the controller
    function myTreeEditController($scope, $routeParams) {
        //set a property on the scope equal to the current route id
        $scope.id = $routeParams.id;
    };
    //register the controller
    angular.module("umbraco").controller('MyPackage.MyTree.EditController', myTreeEditController);
})();

Create a view

As per the conventions above our editor view will need to be located at:

/App_Plugins/MyPackage/BackOffice/MyTree/edit.html

The view is simple, it is just going to show the current id being edited

<div ng-controller="MyPackage.MyTree.EditController">
    <h1>Hello world!</h1>
    <p>
        You are current editing an item with id {{id}}
    </p>
</div>

Create a Dialog

This is the same principle as an editor, you just need to follow conventions. Based on the above conventions the 'create' dialog view will be located here:

/App_Plugins/MyPackage/BackOffice/MyTree/create.html


HostForLIFE.eu Umbraco 7.2.8 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.

 



HostForLIFE.eu Launches Umbraco 7.2.8 Hosting

clock August 19, 2015 06:56 by author Peter

HostForLIFE.eu, a leading web hosting provider, has leveraged its gold partner status with Microsoft to launch its latest Umbraco 7.2.8 Hosting support

HostForLIFE.eu, a leading Windows web hosting provider with innovative technology solutions and a dedicated professional services team, today announced the support for Umbraco 7.2.8 hosting plan due to high demand of Umbraco users in Europe. The company has managed to build a strong client base in a very short period of time. It is known for offering ultra-fast, fully-managed and secured services in the competitive market.

HostForLIFE.eu hosts its servers in top class data centers that is located in Amsterdam (NL), London (UK), Paris (FR), Frankfurt (DE) and Seattle (US) to guarantee 99.9% network uptime. All data center feature redundancies in network connectivity, power, HVAC, security and fire suppression. All hosting plans from HostForLIFE.eu include 24×7 support and 30 days money back guarantee. HostForLIFE Umbraco hosting plan starts from just as low as €3.00/month only and this plan has supported ASP.NET 4.5, ASP.NET MVC 5/6 and SQL Server 2012/2014.

Umbraco 7.2.8 is a fully-featured open source content management system with the flexibility to run anything from small campaign or brochure sites right through to complex applications for Fortune 500's and some of the largest media sites in the world. Umbraco was sometimes unable to read the umbraco.config file, making Umbraco think it had no content and showing a blank page instead (issue U4-6802), this is the main issue fixed in this release. This affects people on 7.2.5 and 7.2.6 only. 7.2.8 also fixes a conflict with Courier and some other packages.

Umbraco 7.2.8 Hosting is strongly supported by both an active and welcoming community of users around the world, and backed up by a rock-solid commercial organization providing professional support and tools. Umbraco 7.2.8 can be used in its free, open-source format with the additional option of professional tools and support if required. Not only can you publish great multilingual websites using Umbraco 7.2.8 out of the box, you can also build in your chosen language with our multilingual back office tools.

Further information and the full range of features Umbraco 7.2.8 Hosting can be viewed here: http://hostforlife.eu/European-Umbraco-728-Hosting

About HostForLIFE.eu

HostForLIFE.eu is an European Windows Hosting Provider which focuses on the Windows Platform only. HostForLIFE.eu deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

HostForLIFE.eu is awarded Top No#1 SPOTLIGHT Recommended Hosting Partner by Microsoft (see http://www.asp.net/hosting/hostingprovider/details/953). Their service is ranked the highest top #1 spot in several European countries, such as: Germany, Italy, Netherlands, France, Belgium, United Kingdom, Sweden, Finland, Switzerland and other European countries. Besides this award, they have also won several awards from reputable organizations in the hosting industry and the detail can be found on their official website.



Joomla 3.4 Hosting France - HostForLIFE.eu :: How to Use SP Page Builder to to Build One Page Layout

clock August 18, 2015 07:09 by author Rebecca

In this tutorial, I will tell you how to build one page layout in Joomla using SP Page Builder. Many templates customized can be used as One Page layout, not only those which were created expressly for this purpose. In general what may be surprising for you don't even need any module position expect maybe top menu, all new positions you can create using only SP Page Builder and each Joomla subpage can use different layout. This Joomla! extension designed for you to help you create your own one subpage masterpiece with many modern trendy features in-build. One of them is an intelligent responsive design that changes it's display depending on the size of the screen your visitor is viewing your site with.

Step 1

First step is almost this same, you have to install SP Page Builder component (Basic or Pro version), you can go to http://www.joomshaper.com/page-builder/

Step 2

Inside PB component click "New" button to create a new page view. Input name, for example "onepage". Now for example you can install template layout called "Full Width Layout" which can show you how it works.

While building PB we kept in mind User Experience and customizability. As a result it is easy to navigate and to customize appearance of used elements.

Step 3

Each row has under "gear" icon settings also there you will find "Section ID" field - where you can set the ID attribute for the specific element. An ID should be unique within a page if you want use it later for OnePage purposes. Knowing this you can easily add new rows with selected addons and use unique ID name for each of them, for example: company-features, our-services, our-clients, address-map.

More generally, design requires making many choices, including colors, fonts, and images; we leave selecting these variables to future work.

Step 4

After it will allows you to use #company-features menu links in Menu Manager for your sub-menu module. Right now focus on adding different add-ons to your layout with real content if you have it.

Step 5

Save new page layout, and go to Menu Manager -> New Menu Item -> Menu Item Type -> SP Page Builder -> Page and choose your created before layout, in my case it was "one-page".

It means that under this menu item you will have page which you created in SP Page Builder few moments ago.

Step 6

Now using # before ID name you can add menu lub sub-menu links. Don't forget that they are only local links in single page view.

Remember, the component offers here only basic styles - so if you need more polished and beautiful final result you have to use your own css styles and class'es in rows. Happy designing!

HostForLIFE.eu Joomla 3.4 Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



Magento Hosting UK - HostForLIFE.eu :: 3 Ways to Create Promo Coupons Code in Magento

clock August 10, 2015 06:46 by author Rebecca

In this tutorial, I will show you how to create discount coupons code in Magento via 3 examples of different shopping cart rules that will help you set up rules for your own eCommerce store and let your customers take advantage of these great offers.

Step 1: Setup Free Shipping

To setup free shipping, you may follow these steps:

  1.     Log in to Magento Admin.
  2.     Click on Promotions –> Shopping Cart Price Rule.
  3.     Fill in the fields; be sure to give the rule a Name and Description and decide whether or not you are choosing ALL Customer groups or not.
  4.     In the General Information page in the coupon menu, select the Specific Coupon option.
  5.     Enter a code in the coupon code field (can be letters or numbers).
  6.     In the Uses Per Coupon field, specify the number of times a customer can use this coupon code if you would like to provide a limit. If not, leave blank.
  7.     In the Uses Per Customer field, specify the number of times a customer can use this promotion if you would like to provide a limit. If not, leave blank.
  8.     In the From/To Date menu, select a time frame for your coupon if you would like to provide one. If not, leave blank.

Make sure these conditions are met [none for this case]:

Make sure these actions are met:

And if you want something more specific, such as Free shipping on only a certain item, follow these actions:

Remember to click Save Rule to save all changes.

Step 2:  Create Buy 1, Get One for Free Coupon

Follow steps a-h from previous example first

Then ensure these Actions are met:

  •     Set the Discount amount to 1. This is the quantity that is discounted (the Y value, the quantity received for free).
  •     [Optional] If you want to set the number needed higher than 1, e.g., to 5, set the discount Qty Step (Buy X) to 5. This is the quantity the customer must purchase in order to qualify for the free item.
  •     [Optional] If you want to set it to a specific product SKU, you can enter these in the Conditions on the Actions tab.
  •     Click Save Rule to save all changes.

Step 3: Creating a Coupon Code for a Specific Product

There’re some cases that you just want to create coupon code for a specific product, it’s fine, you can do that:
Follow steps a-h from #1. Then, set the Conditions:

  1.     On left sidebar, click conditions tab.
  2.     Click the + button.
  3.     Select Product Attribute Combination.
  4.     Click + button.
  5.     Select SKU.
  6.     Now you will see the SKU.
  7.     Place your product SKU here.

Note: If you are not seeing SKU in the dropdown, go to: Catalog –> Attributes –> Manage Attributes. Search for SKU attribute and set the drop down “Use for Promo Rule Conditions” to “YES.”

Then, set the Actions:

  1.     Under Actions tab, choose how much you’d like to discount.
  2.     Click Save Rule to save all changes.

Well done! You are now successful to create coupons for your Magento store!

HostForLIFE.eu Magento Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.

 



European Ajax Hosting UK - HostForLIFE.eu :: How to Make Custom Alert Message with Ajax?

clock August 6, 2015 09:53 by author Peter

In this article, we are going to learn how to make custom Alert Message with Ajax. Some time we needed to make clone of windows alert message, however that alert message isn't permitting to change the header text. Here using Ajax model popup extender i'll show you how to make custom message box:
Add the user control file and ajaxtoolkit reference in your project.

Write the following code in ascx file.
<style type="text/css">
.MessageBoxPopUp
{
background-color:White;
border:solid 2px #99B4D1;
}

.MessageBoxButton
{
background-color: #A0A0A0;
border: solid 2px #B4B4B4;
color: Black;
font-weight:bold;
font-family:Verdana;
font-size:9pt;
cursor:pointer;
height: 20px;
width:70px;
display:none;
}
.MessageBoxHeader
{
height:17px;
font-size:10pt;
color:White;
font-weight:bold;
font-family:Verdana;
text-align:Left;
vertical-align:middle;
padding:3px 3px 3px 3px;
background-color:#3399FF;
border-bottom:2px solid #B4B4B4;
}
.MessageBoxData
{
height:20px;
font-size:8pt;
font-family:Verdana;
color:#3A4349;
text-align:Left;
vertical-align:top;
}
</style>
<script type="text/javascript">
function closeModelPopup(btn) {
// var mpe = document.getElementById("<%= mpeMessageBox.ClientID %>");
$find('mpeFirmMessageBox').hide();
}
</script>

<cc1:ModalPopupExtender ID="mpeMessageBox" runat="server" DynamicServicePath="" Enabled="True"
TargetControlID="btnTemp" PopupControlID="pnlMessageBox" BackgroundCssClass="modal"
PopupDragHandleControlID="pnlMessageBox" CancelControlID="btnCancel" BehaviorID="mpeFirmMessageBox">
</cc1:ModalPopupExtender>

<asp:Panel ID="pnlMessageBox" runat="server" Style="display: none; width: 300px;
height: 140px;" class="MessageBoxPopUp">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr class="MessageBoxHeader" style="height: 17px;">

<td colspan="2">
    <asp:Label ID="lblHeader" runat="server"></asp:Label>
</td>

<td align="right" style="padding: 2px 2px 0px 0px;">
    <%--<asp:UpdatePanel ID="upnCloseMessageBox" runat="server">
        <ContentTemplate>--%>
            <asp:ImageButton ID="imgBtnClose" runat="server" ImageUrl="~/Image/close_icon.png"
                 OnClientClick="closeModelPopup(this)" />
        <%--</ContentTemplate>
    </asp:UpdatePanel>--%>
</td>
</tr>

<tr>
<td colspan="2" style="height: 5px;">
</td>
</tr>
<tr style="height: 88px;">

<td style="vertical-align: top; padding-left: 5px;">
    <asp:Image ID="imgInfo" runat="server" ImageUrl="~/Image/information-balloon.png" Width="40px" />
</td>

<td class="MessageBoxData" colspan="2" style=" padding: 10px 5px 5px 5px;">
    <asp:Label ID="lblMessage" runat="server"></asp:Label>
</td>

</tr>
<tr style="vertical-align: bottom; height: 20px; padding: 0px 5px 5px 0px;">
<td style="width: 40px;">
</td>
<td align="right" style="width: 180px">
    <asp:Button ID="btnOk" runat="server" CssClass="MessageBoxButton" />
</td>

<td align="right">
    <asp:Button ID="btnCancel" runat="server" CssClass="MessageBoxButton" />
</td>
</tr>
</table>
</asp:Panel>

Now, add the following code in .cs file
public delegate void delegate_OkClick();
public event delegate_OkClick OnOkClick;
public string Header
{
set { lblHeader.Text = value; }
//set { lblHeader.InnerHtml = value; }
}

public string Message
{
set { lblMessage.Text = value; }
}

public Button CancelButton
{
get { return btnCancel; }
}

public Button OkButton
{
get { return btnOk; }
}

public AjaxControlToolkit.ModalPopupExtender MessageBox
{
get { return mpeMessageBox; }
}

protected void Page_Load(object sender, EventArgs e)
{
}

protected void btnOk_OnClick(object sender, EventArgs e)
{
//raise the event if not null
if (OnOkClick != null)
OnOkClick();
}
public void displayMessage(string message)
{
displayMessage(message, null);
}
public void displayMessage(string message, int? type)

{

lblHeader.Text = "Alert Message";
//lblHeader.InnerHtml = title;
lblMessage.Text = message;
btnCancel.Attributes["style"] = "display:block";
btnCancel.Text = "Ok";
mpeMessageBox.Show();
}


Your message box is ready, now you need to call from the aspx page where ever you need to show the message.
You need to add below line of code in
<%@ Register Src="~/Control/Alert.ascx" TagName="MessageBox" TagPrefix="mb" %>
<asp:ScriptManager runat="server" ID="s"></asp:ScriptManager>
<mb:MessageBox ID="ucMessageBox" runat="server"></mb:MessageBox>

And from the code behind cal the display message write the following code:
protected void btnClick_OnClik(object sender, EventArgs e)
{
ucMessageBox.displayMessage("Alert from Code");
}

HostForLIFE.eu AJAX Hosting
HostForLIFE.eu is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes. We have customers from around the globe, spread across every continent. We serve the hosting needs of the business and professional, government and nonprofit, entertainment and personal use market segments.



About HostForLIFE

HostForLIFE is European Windows Hosting Provider which focuses on Windows Platform only. We deliver on-demand hosting solutions including Shared hosting, Reseller Hosting, Cloud Hosting, Dedicated Servers, and IT as a Service for companies of all sizes.

We have offered the latest Windows 2019 Hosting, ASP.NET 5 Hosting, ASP.NET MVC 6 Hosting and SQL 2019 Hosting.


Tag cloud

Sign in