Tag: web development service

Everything You Need To Know About Drupal Mail System

Drupal Mail System

This blog is all about Drupal Mail system. Email sending in Drupal is entirely straightforward. Essentially you just need to manage two stages to send an email to somebody:

In Drupal to sends an email we need to take care of two things:

  • Declare all the required properties (subject, body, headers, etc) under hook_mail().
  • Call drupal_mail() with the argument for actually sending the email.

However, in the situation like greater and complex site, the above strides won’t be sufficient. In any case, Drupal gives us the Flexibility to redo email sending process, before that it’s important to know how stuff functions in the background first, with the help of Drupal you can easily generate custom pdf using the print module. In this blog, I’ll demonstrate to you how you can redo and extend the Drupal mail framework to satisfy your necessities.

The Email Sending Process

While sending an email drupal_mail() function uses system class for sending an email. Each mail framework needs to actualize MailSystemInterface class to define its own mail sending conduct.

MailsystemInterface class utilizes two strategies:

  • format()
  • mail()

The Mail System Module

Mail related settings can be set through Configuration > System > Mail System.

The mail system variable contains two things:

  • default-system => DefaultMailSystem
  • mailsystem_theme => current.

These key-value pairs are the settings you can adjust under the “Mail System Settings” fieldset.

DefaultMailSystem

The default-system email key describes which mail system class will be used by default for all outgoing emails.

If you don’t modify the site-wide mail system class then this one will be used by drupal_mail() by default.

The mailsystem_theme defines which theme will be used to render emails. Let’s say you are using Mime Mail which

uses a specific template file for it’s emails. The Mail System module checks every theme registry entry for a specific

“mail theme” key/property and if it exists in a particular entry then the specified mailsystem_theme value will be used

to search for more specific template files when the theme registry entry related theme hook will be called.

New Class

If you have two or more different mail system classes available in your system provided by different modules.

If you want to use any custom mail class which would use format() method of one mail system class and mail()

method from another class, so here you can use New Class which allows combining two different mail system classes.

New Setting

The Mail System module permits you to effortlessly add new email keys to the mail_system variable by choosing a

module and a particular email key from its hook_mail() execution.

 

Afterward added new email key to the mail_system variable you will ready to choose mail system class for it.

You will have the capacity to see it under all inclusive default MailSystemInterface class settings.

At the point when drupal_mail is called with your demo_custom _mail email key, then the in a roundabout way utilized

drupal_mail_system() function checks if this email_key exists in mail_system variable. It finds the related key then the

related mail system class will be utilized rather than default class.

Hope this helped you to get most out of the system. Feel free to share your reviews and need assistance regarding

Drupal Development Services. #WeDrupalEveryday

Pick the best answer for your requirements.

3D Animated Hover Effect Of Thumbnails Images

new-blog-addweb_2
This is a custom 3D animated effects for thumbnails images, grid box & card rotate design.
You can use below code for 3D Animation hover effect of images without using any jQuery code and JS libraries.
Feature
  • Browser compatible css
  • Responsive for mobile & i-pad
  • Need not to use any external js, script and libraries
  • SCSS & CSS both codes are available
  • Easy to use
How To Create a 3D Animation hover Effect of Thumbnails Images
Step 1: Manage HTML structure
HTML: Please use below HTML code
<div class="aws-image-thumbnail">
     <a href="#"></a>
      <span>Addweb Solution</span>
 </div>
Step 2: Use below SCSS code
SASS:
.aws-image-thumbnail {
  display: inline-block;
  float: left;
  height: 200px;
  width: 400px;
  margin: 0 0 100px;
  text-align: center;
  -webkit-perspective: 500px;
       -moz-perspective: 500px;
            perspective: 500px;
  span {
    position: relative;
    top: 0;
    left: 0;
    display: inline-block;
    width: 100%;
    padding-top: 5px;
    color: $white;
    font-size: 20px;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    -webkit-transform: rotateX(-80deg) scale(.9);
       -moz-transform: rotateX(-80deg) scale(.9);
            transform: rotateX(-80deg) scale(.9);
    -webkit-transition: all .5s ease 0s;
       -moz-transition: all .5s ease 0s;
            transition: all .5s ease 0s;
  }
  a {
    position: relative;
    display: inline-block;
    height: 200px;
    width: 100%;
    background:linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/img6.jpg');
    background-size: 0, cover;
    background-repeat: no-repeat;
    text-decoration: none;
    -webkit-transform-style: preserve-3d;
       -moz-transform-style: preserve-3d;
            transform-style: preserve-3d;
    -webkit-transition: all .5s;
         -moz-transition: all .5s;
              transition: all .5s;
    &:after {
      position: absolute;
      bottom: 0;
      left: 0;
      height: 36px;
      width: 100%;
      background: inherit;
      background-size: cover, cover;
      background-position: bottom;
      -webkit-transform: rotateX(90deg);
         -moz-transform: rotateX(90deg);
              transform: rotateX(90deg);
      -webkit-transform-origin: bottom;
         -moz-transform-origin: bottom;
              transform-origin: bottom;
      content: '';
    }
    &:before {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      background: rgba(0, 0, 0, 0.5);
      -webkit-box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);
         -moz-box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);
              box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);
      -webkit-transition: all 0.5s;
         -moz-transition: all 0.5s;
              transition: all 0.5s;
      opacity: 0.15;
      -webkit-transform: rotateX(95deg) translateZ(-80px) scale(0.75);
         -moz-transform: rotateX(95deg) translateZ(-80px) scale(0.75);
              transform: rotateX(95deg) translateZ(-80px) scale(0.75);
      -webkit-transform-origin: bottom;
         -moz-transform-origin: bottom;
              transform-origin: bottom;
      content: '';
    }
  }
  &:hover {
    a {
     -webkit-transform: rotateX(79deg);
        -moz-transform: rotateX(79deg);
             transform: rotateX(79deg);
     -webkit-transform-origin: bottom;
        -moz-transform-origin: bottom;
             transform-origin: bottom;
     &:after {
       display: inline-block;
       color: $white;
       -webkit-transform: rotateX(99deg);
          -moz-transform: rotateX(99deg);
               transform: rotateX(99deg);
       transform-origin: bottom;
     }
     &:before {
     -webkit-box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);
        -moz-box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);
             box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);
     opacity: 1;
     -webkit-transform: rotateX(0) translateZ(-60px) scale(0.85);
        -moz-transform: rotateX(0) translateZ(-60px) scale(0.85);
             transform: rotateX(0) translateZ(-60px) scale(0.85);
     }
    }
    span {
     visibility: visible;
     opacity: 1;
     -webkit-transform: rotateX(0) scale(1.2);
        -moz-transform: rotateX(0) scale(1.2);
             transform: rotateX(0) scale(1.2);
     -webkit-transition: all .8s;
      -moz-transition: all .8s;
           transition: all .8s;
    }
  }
}
CSS:
.aws-image-thumbnail {
    display: inline-block;
    float: left;
    height: 200px;
    width: 400px;
    margin: 0 0 100px;
    text-align: center;
    -webkit-perspective: 500px;
       -moz-perspective: 500px;
         perspective: 500px;
  }
  .aws-image-thumbnail span {
    position: relative;
    top: 0;
    left: 0;
    display: inline-block;
    width: 100%;
    padding-top: 5px;
    color: #FFF;
    font-size: 20px;
    text-align: center;
    visibility: hidden;
    opacity: 0;
    -webkit-transform: rotateX(-80deg) scale(0.9);
       -moz-transform: rotateX(-80deg) scale(0.9);
                transform: rotateX(-80deg) scale(0.9);
    -webkit-transition: all .5s ease 0s;
       -moz-transition: all .5s ease 0s;
                transition: all .5s ease 0s;
  }
  .aws-image-thumbnail a {
    position: relative;
    display: inline-block;
    height: 200px;
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("../images/img6.jpg");    background-size: 0, cover;
    background-repeat: no-repeat;
    text-decoration: none;
    -webkit-transform-style: preserve-3d;
       -moz-transform-style: preserve-3d;
               transform-style: preserve-3d;
    -webkit-transition: all .5s;
       -moz-transition: all .5s;
               transition: all .5s;
  }
  .aws-image-thumbnail a:after {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 36px;
    width: 100%;
    background: inherit;
    background-size: cover, cover;
    background-position: bottom;
    -webkit-transform: rotateX(90deg);
       -moz-transform: rotateX(90deg);
                transform: rotateX(90deg);
    -webkit-transform-origin: bottom;
       -moz-transform-origin: bottom;
                transform-origin: bottom;
    content: '';
  }
  .aws-image-thumbnail a:before {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    -webkit-box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);
       -moz-box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);
                box-shadow: 0 0 100px 50px rgba(0, 0, 0, 0.5);
    -webkit-transition: all 0.5s;
       -moz-transition: all 0.5s;
                transition: all 0.5s;
    opacity: 0.15;
    -webkit-transform: rotateX(95deg) translateZ(-80px) scale(0.75);
       -moz-transform: rotateX(95deg) translateZ(-80px) scale(0.75);
                transform: rotateX(95deg) translateZ(-80px) scale(0.75);
    -webkit-transform-origin: bottom;
       -moz-transform-origin: bottom;
                transform-origin: bottom;
    content: '';
  }
  .aws-image-thumbnail:hover a {
    -webkit-transform: rotateX(79deg);
       -moz-transform: rotateX(79deg);
                transform: rotateX(79deg);
    -webkit-transform-origin: bottom;
       -moz-transform-origin: bottom;
                transform-origin: bottom;
  }
  .aws-image-thumbnail:hover a:after {
    display: inline-block;
    color: #FFF;
    -webkit-transform: rotateX(99deg);
       -moz-transform: rotateX(99deg);
               transform: rotateX(99deg);
    transform-origin: bottom;
  }
  .aws-image-thumbnail:hover a:before {
    -webkit-box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);
       -moz-box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);
            box-shadow: 0 0 25px 25px rgba(0, 0, 0, 0.5);
    opacity: 1;
    -webkit-transform: rotateX(0) translateZ(-60px) scale(0.85);
       -moz-transform: rotateX(0) translateZ(-60px) scale(0.85);
                transform: rotateX(0) translateZ(-60px) scale(0.85);
  }
  .aws-image-thumbnail:hover span {
    visibility: visible;
    opacity: 1;
    -webkit-transform: rotateX(0) scale(1.2);
       -moz-transform: rotateX(0) scale(1.2);
                transform: rotateX(0) scale(1.2);
    -webkit-transition: all .8s;
       -moz-transition: all .8s;
    transition: all .8s;
  }
Hope this helps you to make things work..!!! Need more assistance regarding Web design service…! Feel free to leave your valuable feedback and stay tuned for more similar blogs.

How To Show Facets On Non-Search Page As Normal Widget Instead Of List

Show facets on non-search page

Facets allow users to search the site based on selected criteria. Using Facet API module we can add facets on site. For each field that is indexed, we can have facets. These facets can be configured and displayed on search pages. We have various configuration options available for this.

Many times we need to show these facets on pages that are not Search pages. Facet API module does provide this functionality. You need to create a view display of type “Facet blocks”. Below are the steps to do so.

1 – Create a view of search index and a display of type “Facets Block”. You can make this display in the same view as the search page.

2 – Configure “Facet field” and “Search page path”. Search page path is the path of the search page.

The block is then available to be assigned to the region in blocks page.

However, there are several limitations to this:

  1. The facet links will always be styled as a list, no rewrite or format selection is possible.
  2. It is also not possible to use the normal Facet API widgets for these facets. This is because re-using the Facet API components from outside of the Facet API cannot be easily achieved.

In many cases, Professional Web Development need to show facets on the non-search pages as normal facets instead of the list. To achieve this, follow steps below:

  1. Create a facet block as mentioned above.
  2. Show this block on the non-search page as usual.
  3. Make sure that facets blocks are displaying on non-search page as well. Also, make sure that facet block is showing above views facets blocks i.e weight of facets block is higher than the views facets block.
  4. Edit the facet block and set “Display for searches of facets” to “All search page”.

Doing this will make both the blocks visible on the non-search page. You can hide the block showing list using CSS. This solution works for Search API Database Search and Search API Solr Search.

The final result is something like this:

Read more Blogs https://goo.gl/jhRmqR

How Autocomplete Done In Angularjs Using Directive And Factory

The Autocomplete textbox is used for providing a suggestion when we are typing into the input box (text field). You notice when we typing in the Google search, that is called Autocomplete. It is mostly used for instant search from the predefined or AJAX based listing.

Use of filters is also known part in Angularjs. Filters are used for filtering the data based on passed argument. Filters are used in template files in angularjs. In filters, we can use expressions as well. And we are going to use all these for getting the autocomplete functionality.
Example of filters in template file is,
Ex.(ng-repeat=”i in items | filtersearch:searchString”).
Here, filtersearch is a name of filter and ‘searchString’ is arguments that it will passed text parameter. Whatever we will put into the Textbox, it will be passed as an array and it will be stored as an elements of an Array.
Note: Here you also need to supply ‘searchString’ this as your ng-model name for input search box in web development service.
Let me walk you through how to create Autocomplete textfield 
1. Make a Simple form to create autocomplete textfield
Create a one input textfield, give a ng-change event in this text field
And give one ng-model name for this text field,and And Also Create a one select box it would be ‘multiple’ also give ng-style  because whenever user selects text from the list then selected item will be copied in the text box and we also need to hide the list.
<div>
<input type="text" ng-model="searchString"  ng-change="searching()" ng-keydown="changecursor($event)" id="input" autofocus><br>
<select id="select" ng-style="vis" ng-model="txt" ng-click="copy($event)" ng-keypress="copy($event)" ng-keydown="changecursor($event)” multiple>
<option ng-repeat="i in items | filtersearch:searchString">{{i.string}}</option>
</select >
</div>
Here, ng-model=”txt” is used for copy text into the text field.

Reaf more https://goo.gl/qrmAI8

How To Modify WordPress Dashboard Without Plugin

How To Modify WordPress Dashboard Without Plugin

Today, I am going to provide you easy and quick steps to modify wordpress dashboard without plugin. Please follow below steps:
1. Hiding unwanted widget from wordpress dashboard
You can easily hide widgets from wordpress dashboard that you have no longer needed.
You have to add following code into your active theme’s function.php file:
add_action('wp_dashboard_setup', 'custom_hide_widgets');
function custom_hide_widgets() {
     global $wp_meta_boxes;
    
//for Activity
unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);
    
//for At Glance    unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);    
}
This will hide Activity & At Glance from your wordpress dashboard.
2. Replace “Howdy” with your text in wordpress admin bar
By default in wordpress admin bar “Howdy” text is shown you can easily change it with your text. You have to add following code into your active theme’s function.php file:
function replace_howdy_with_your_text( $wp_admin_bar ) {
 $account_info=$wp_admin_bar->get_node('my-account');
 $your_title = str_replace( 'Howdy,', 'Your Text', $account_info->title );
 $wp_admin_bar->add_node( array(
     'id' => 'my-account',
     'title' => $your_title,
 ) );
}
add_filter( 'admin_bar_menu', 'replace_howdy_with_your_text', 25 );
Here we use admin_bar_menu filter to replace text.
3. Change wordpress dashboard footer text.
You can change wordpress dashboard footer text by your own text or link or other. You have to add following code into your active theme’s function.php file:
 function custom_footer_admin_text () {
       echo "Your own text or link";
  }
  add_filter('admin_footer_text', 'custom_footer_admin_text');
Here we use admin_footer_text for change admin footer text. For link you need to use anchor tag (<a>).
4. Create your own Admin Color Scheme  
You can create you own admin color scheme for that you need to create css for your color scheme. Create a directory called admin-css into your active theme and add your css file in it.