Kari Kääriäinen
  • Member for 9 years, 8 months
  • Last seen more than a month ago
Using Views to List a Member's Organic Groups (7.x-2.3)
Accepted answer
11 votes

This is how to get the OG membership ID:s to start with. Add new view. Show -> OG membership (important!) Then in some display add a contextual filter -> OG membership: Entity id. Provide default ...

View answer
Add a field to multiple content types at once?
Accepted answer
9 votes

Broad lines using the Features module could be: Add the field to two (to see the pattern) content types by hand Create a Feature including field bases and field instances for the newly created fields ...

View answer
Views removes style attribute in "Rewrite Results"
6 votes

Yes, Views does block style attribute for security reasons. Class attribute is allowed. Here's one long discussion about it https://drupal.org/node/853880 and some other ideas for workarounds Add ...

View answer
How can I sort a view based on a rewritten field?
Accepted answer
4 votes

If you don't want to go for the module route, this is one alternative: 1) install Computed Field module 2) add a computed field to your content type 3) in the field settings, in the Computed code (...

View answer
How to assign users to a group
Accepted answer
4 votes

From a permission point of view, (instead of groups) these are called "roles" in Drupal. (From a content-user-access point of view there is the Organic groups module, but that's another story.) You ...

View answer
How to Translate Content type name using i18n module?
4 votes

Note that admin/structure/types always displays untranslated node type and description whereas node/add displays translated node type and description. Your screenshot shows that you have translated ...

View answer
How to get node content in an sql query?
3 votes

For education purposes, this is the sql that D6 Views produces (according to its sql preview): This particular node would be the one having node id 1: SELECT node_revisions.body AS ...

View answer
How to Compute fields on the fly
3 votes

This sounds like cashier functionality. There has been some effort for D6, see Drupal POS (Point of Sales) System. I haven't used this. Ideally, this would be done with JavaScript (I have once done ...

View answer
Views Tables on Responsive Layout
3 votes

Set the table width to 100% with css. If some other rule is overriding this, you may have to increase the specificity or add !important. If you need more control of your table columns, there is a ...

View answer
I see all aliases besides the home page alias (At URL bar)
3 votes

If you set your site home page "Decorations-for-all-houses" (or perhaps lowercase would be less confusing) at admin/config/system/site-information, any home link provided by core, contrib modules, ...

View answer
How to add Login/Register link in the right header in Skeleton theme
Accepted answer
2 votes

Drupal has this feature where you can create menu links for user/login and user/logout and only the appropriate one will be displayed automatically. Same goes for user/register. So create a new menu, ...

View answer
Change the description for username field in user registration
2 votes

The text is in user_account_form function https://api.drupal.org/api/drupal/modules%21user%21user.module/function/user_account_form/7 To change it, you can implement a hook_form_alter. I believe the ...

View answer
How to convert underscores to hyphens?
2 votes

At admin/build/path/pathauto change the separator from underscore to hyphen and make sure the other punctuation settings are the way you like (the ones that say "Replace by separator"). Then at ...

View answer
how do i create a site that allows users to create "organizations?
2 votes

The module to do this with in Drupal would be Organic Groups https://drupal.org/project/og. It's not a trivial module though. Here's the official documentation: https://drupal.org/node/1114858. There ...

View answer
Migrate users from Drupal 5 to Drupal 7
2 votes

Upgrade from Drupal 5 to 6, then from 6 to 7. That's it. No further modules or writing your own code is needed, users and content will migrate just fine. You only need Migrate and other modules if you ...

View answer
How to remove 'By term' and 'View' tab being displayed at top of pages?
Accepted answer
2 votes

'By term' seems to be generated by one of the views in Organic groups: posts_by_term. You should be able to disable it at admin/build/views. Here's the issue https://drupal.org/node/1635082. The View ...

View answer
How to change HTML output of main menu
2 votes

Instead of trying to alter the html of the main menu the theme prints out for you, it could be easier to disable the main menu from the theme settings and use the Menu block module for rendering the ...

View answer
How to add custom images to header
Accepted answer
2 votes

The simplest way: Add a block at admin/structure/block/add. Add the html for your images directly into Block body. Make sure the text format is Full HTML. Assign your block to Header region. Before ...

View answer
How to filter filenames in views based on a match to currently logged username?
Accepted answer
2 votes

If you could use tokens in views filters you could do something like File: name ... contains any word ... [user:name] and that would end up in the sql as file_managed.filename LIKE '%username%' which ...

View answer
Print ALT tag from an Image FIeld in a Custom Field Template
Accepted answer
2 votes

If you install Devel module and use dpm($item); in your code, you will see the structure of $item. Alt is in $item['#item']['alt']. See for example Modify tpl file to print the path to the image ...

View answer
How can one add superscript character like TM or Reg on a block title
2 votes

Trademark ™ is just a character, it doesn't need html. There is no reason why you can't have special characters in block titles. Superscript as in sup tags is a different story, see the other answer. ...

View answer
Custom Date Format Not Available to my Date Field
2 votes

They seem to be build differently, you really can't do that I guess. But do this: Add a new format at admin/config/regional/date-time/formats. Then add a new Date type at admin/config/regional/date-...

View answer
Categorizing content types
Accepted answer
2 votes

This module appears to be built exactly for your use case: https://drupal.org/project/content_type_groups From the readme.txt: "Create a content type group called 'Media' and add the 'book', 'movie', ...

View answer
Node and revision id
2 votes

If you begin to add nodes and never edit them, like you would do when migrating data to a new Drupal installation, then the nid and vid would increment at the same pace, and would happen to be the ...

View answer
Adding <li> to options on node edit and node create screen
Accepted answer
2 votes

There is the Taxonomy Term Reference Tree module that will format terms hierarchically. This module provides an expandable tree widget for the Taxonomy Term Reference field in Drupal 7. This ...

View answer
Change Input Field Value using Hook Form Alter (User Login Block)
Accepted answer
2 votes

Put this in your module: function mymodule_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'user_login_block') { $form['name']['#size'] = 10; $form['pass']['#size'] = ...

View answer
Output filename in views
1 votes

In Drupal 8: in Relationships, add a relationship to your image (mine looks like: Image, (field_image:target_id), Content, Appears in: image). In the next step select "Require this relationship". Now, ...

View answer
Different front page per language
1 votes

Make a view that provides a block for each language. Master has no output, Content: ID (< 1). For Language set Rendering Language: Content language of view row (default). If you want to display a ...

View answer
What is the difference between 'Groups audience' and 'Groups content visibility' in Organic Groups Access?
1 votes

Group audience = which group(s) content was posted to. Group content visibility = who can see the posted content, only group members or all site users. Do contact the author directly to ask them and/...

View answer
Which module can hide or show text?
Accepted answer
1 votes

There is a Quiz module, that looks awesome: https://www.drupal.org/project/quiz The Quiz module lets you create graded assessments in Drupal. A Quiz is given as a series of questions. Answers are ...

View answer