Drupal Dump

Drupal Snippets, Hacks and more....

495 posts since 2011

Multilanguage(i18n) Taxonomy and URL aliases with pathauto

Well you want to use i18n taxonomy and have nice site, that is optimized for SEO and for viewers. Well you will have problems, here are some solutions depending on the which type of multilanguage option you choose for your taxonomy

Panels and translating Title

Panels seem all powerful, especially when used with Views. But then you come to simple problem and I can't be solved. You can't translate a title of a Panels. Seems very stupid but that is how it is.

Solutions.

Translating paths

I have got this panel, that has the same content for both English and Croatian. But I want to have custom path for each of them, so that address bar doesn't say something on Croatian when user interface is in English.

Simplenews SCS - Simplenews Content Selection

As i mention before in simplenews template you need to make table layout for it to work in all email readers, so if You are using this module, for selecting content of your newsletters, you might need this. I made and overide of template functions of SCS to make them how I wanted them to look so this is what I added to template.php

Simplenews template

This one is a drag to make. Very bad documentation and even less examples. Anyway what you need to do is go to module folder of simplenews and copy from subfolder "theme" files like simplenews-newsletter-body.tpl.php, simplenews-newsletter-footer.tpl.php to your default theme folder and edit them there. And what you need to do is make most of the html.

Database repair with phpMyAdmin

Sometimes your drupal DB will have problems, and it will cause slow queries, especially when having many nodes. Log to you phpMyAdmin and select all tables in DB and click optimize or repair, this could fix many problems and make your site run smooth again.

Webform block redirect page

You hate it when webform block redirects to webform page and your visitor loses the page he/she was on when submiting form. Well you can sort this out.

Checking variables - actions for VBO and other modules

If you are creating some actions for VBO module, so you can do some operations on fields over view. You would probably first check what is there to fetch in object you are using. So for example to get a listing of user objects variables you make this submodule