How to Add Custom table in Views Query Alter tutorial

Hint book for programmers

Issue: How to Add Custom Table in View Query Alter.

We can add our custom table in view query with the help of hook_views_query_alter .

I have table name Custom Table name “custom_node” and I want add this table in my views Query to make the Condition result for View.

Code Example:
function hook_views_query_alter(&$view, &$query){
if($view->name == “view_machine_name”) {
$join = new views_join();
$join->table = ‘custom_node’;
$join->field = ‘custom_id’;
$join->left_table = ‘node’;
$join->left_field = ‘nid’;
$join->type = ‘inner’;

$query->add_relationship(‘custom_node’, $join, ‘node’);

$query->where[1][‘conditions’][] = array(
‘field’ => ‘custom_node.custom_nid’,
‘value’ => array(‘7’), // Make your condition with the help of Where Clause
‘operator’ => ‘in’



View original post


Phone bars and CRM

Sugar corner

CTIeCRMAmong the essential tools to get the full control of the Contact Center, the Phone Bar is the application, also known as agent, installed in the operator terminal that allows to effectively manage inbound & outbound calls. Moreover, the Phone Bar exploits the potentiality arising by CTI (Computer Telephony Integration), the increasingly integration between the phone, the pc and the CRM application. In the following

View original post 1,025 more words

Don’t Let These Email Marketing Myths Ruin Your CTR

Maulik Shah's Blog

Are you running an email campaign? Chances are you have certain email marketing myths or better say prejudice that may jeopardize your CTR! We have built a list of email marketing myths that reduces the Click-Through Rate (CTR). Reduction in CTR will result in unexpected outcomes of email marketing campaign. Enterprises conducting email marketing campaigns should ensure they are doing it right rather annoying their customers. Being it the most interesting part of the online marketing strategy, it has to be commendably intuitive with the business flavor!

Your business requires a marketing strategy that adds impetus to the business performance. Email template design is important for businesses seeking huge customer range. It has to fulfill the business goals and objectives.

Get Rid of These Email Marketing Myths that Reduces CTR

1.Email Campaign Should Target only Millennials

A study says email opening rate among millennials is very less (they prefer text…

View original post 589 more words

Second taste of glory for 2 Slick

Chad '2 Slick' Sugden

ChadGloryNewark’s Chad ‘2 Slick’ Sugden will be back on the road to glory on Friday 3 April, when he takes on Atakan Arslan on the card of GLORY 20.

The Suggy’s Gym fighter had his first taste of GLORY in March 2013, defeating Sam Wilson when the promotion came to the Excel Arena in London. Now he will be heading to Dubai for a 77kg Superfight against his Turkish opponent.

“This is a really exciting opportunity for me,” said Chad. “Not only do I get to visit Dubai for the first time but I’ll be going there to take part in one of the GLORY shows, which are renowned for promoting match ups between some of the world’s top fighters.

“Training in the run up to early April is going well and I’m looking forward to shaking up the Welterweight division with my unique skills. My opponent for this one…

View original post 155 more words

No more typing on Facebook messenger

Also: Google joins Microsoft in announcing real-time voice to text translation

Facebook has announced that it is rolling out a new feature on its messenger app that will enable users to send a message without even typing a word.

What’s more, an incoming voice message can also be converted into text if you don’t want to listen to the message.

In a post on his Facebook page on January 16, David Marcus, Vice-President of Messaging at Facebook, said: “We’re always working on ways to make Messenger more useful. As many of you know, we already offer a feature that enables people to send voice clips to their friends without having to type out text. Today we begin to roll out a small test that helps people read the voice clips they receive instead of having to play them out loud.”

“So, for example, if you’re at a concert or in a meeting, and would prefer to read a voice clip from a friend, you now can if you’re part of the small test we’re rolling out,” it added.

Once the testing is done, Facebook plans to roll out the feature en masse.

Meanwhile Google last week announced an initiative where it will allow users to get translations in real time of a spoken language.

Currently Google translator can translate text from more than 90 different languages. The Google translator app for mobile devices enables a user to get the features on the move.

According to a report by ‘New York Times’, Google is expected to soon make an announcement about the new added real time voice translation.

Microsoft had launched a similar project recently which enables two users speaking Spanish and English communicate with each other on Skype.

Microsoft’s Skype translator gives a user the ability to speak another language without learning one. The software will be able to recognize the voice from the first user, translate it into a predetermined language set by the second user. An on-screen transcript of your call is also displayed.

Translator is currently available in English and Spanish and Microsoft has promised to add more languages soon.

Currently Microsoft is allowing users to test the Skype translator preview. Users can register and choose one among either Chinese, Arabic, French, German, Italian, Japanese, Russian, Korean or any other language of your choice.

“Skype Translator is a brand-new experience from Skype, and it’s still learning and improving the way it translates calls. As a preview user of Skype Translator you’ll be instrumental in helping us refine technology and bring us closer to our goal of overcoming language barriers worldwide…” says the note to those interested in registering for the Preview.

via: emirates247

New service to offer free WhatsApp while roaming in 150 countries:

All you have to pay is Dh43 as an annual recharge

Facebook-owned WhatsApp has gained popularity to such an extent that there are multiple related piggyback offerings that have sprung up.

In a new move, an Italian company is offering a SIM card which offers you free roaming data that can only be used for WhatsApp messaging.

The service is unlimited meaning there are no caps or fair usage policy for using WhatsApp. All you have to pay is €10 (Dh43) as an annual recharge.

The WhatSim card connects to more than 400 operators in about 150 countries.

Manuel Zanella, founder and CEO of Zeromobile, Italy’s Global Mobile Operator for low-cost roaming came up with this solution as he felt that WhatsApp was the most used service by travellers while they are roaming.

“Anywhere in the world it connects to the provider with the best coverage and signal right where you are. If you change your position, it automatically searches for a new provider. If a better one is available, it connects itself without you even noticing it,” the company said in its statement.

Click here to check the list of countries where the SIM card will work:

“There is no other solution for real-time chatting. You need to wait for the first free Wi-Fi you come across along the way or at the hotel… While free Wi-Fi everywhere is a myth, WhatSim is for real,” it adds.

Via: emirates247

Freelance Web Developer Dubai