Tag: Drupal

finalrest
The future of the web is inarguably mobile. Mobile use is clearly increasing as people spend more time on their phones, and the rate that people are using dedicated mobile apps rather than their mobile browser is also increasing. But with web services, mobile apps can integrate popular web-based content management systems and in the process save hundreds of development hours while providing enhanced user experience for both the end user and web editors. This also creates tremendous, largely untapped business opportunity for agencies.

View our conversion service.

Continue Reading..

Preface

Our fourth  multilingual site and significantly more of a challange.  When in the past I had dealt with latin alphabet only, this time I was dealing with Arabic and there were some major differences here. In the Arabic language everything reads right to left. So through simply checking a setting in i18n admin panel you can add the attribute dir="rtl" to the <html>  tag. This conveniently moves all your content to the right side of your page and changes text highlight from this direction as well. This caused quite a few issues mainly with CSS.   Sprites were off on the Arabic version by a few px, but luckily this was easy to fix, as Drupal adds the class i18n-ar to the body tag, so it was easy to target Arabic only views. One other major issue I had was a large left margin of > 1000px when language was set to Arabic, this was fixed by setting body tag to overflow:none;

Translating Fields and Taxonomy

Need to control which users can access a node/page of a particular content type on your Drupal site?

The Drupal Node API provides us a quick way to do this. It provides the hook_nodeapi function to react to the actions affecting all kinds of nodes. We can easily implement this hook in our module or theme. A prototype of this hook looks like this:

function myCustomModuleName_nodeapi (&$node, $op) {

/*Your code and conditions here*/

}

Here myCustomModuleName is the name of the module in which this hook is defined. The two parameters are $node, which represents the node on which the action is being performed and the other one $op,  is the kind of action which is being performed. The $op can have values like view, alter, delete, print and so on…

As an example, I was looking to design such a condition for my website:

  • If enrolled user creates content type for "recipe", restrict access to recipe except for node author and admin.

So, I needed to develop a mechanism through which for each node of type “recipe”:

  • Everyone can see nodes created by admin including Anonymous user.

Contact

office: (212)-658-1447 | cell: (914)-715-8862 | alex@freeenergymedia.com

Name
Email
Message

Message sent, Thanks!
Error! Please validate your fields.
2017 FEM NYC (formerly Free Energy Media)