


How to set default body message for Privatemsg embedded on page?
This is the code I used on the node template and block, I just tried it both module_load_include(‘pages.inc’,’privatemsg’); $recipients = array(user_load(arg(1))); $subject = ‘This is just a default that can be changed’; $body =... read more
Cookies for anonymous users aren’t read nor checked
I currently have a module on http://hitechwolf.com that creates a welcome overlay upon a user’s first visit, This should work by utilizing a jquery created cookie and showing the overlay based on its existence. The jquery works, the cookie is created, but for... read more
field collection items are not in panels
Im trying to use Panels to display a Field collection but it looks like it is not in the overlay (see screenshot). How can I display the field collection in my panels? read more
Views Bulk Operations with Field Collection Item tokens
I am trying to modify the values of one field in all instances of a field collection type. I have a view listing all field collection items, that I want and an operation field with modify entity. Setting value in the field works fine, but I can’t use any tokens... read more
Custom space types in Open Atrium
I have seen the OA webinar on extending Open Atrium that documented how to make custom content types for sections and have them be recognized and tie in to the OA hierarchy. I would like to do the same but with spaces. I can clone the space content type to get... read more
How to embed a view in a specific node?
I try to embed a view in a specific node. I found tutorials for doing this with Drupal 7 and PHP-Templates: <?php print views_embed_view(‘view_name’); ?> But I look for a way in Drupal 8 with twig-Templates. I tried to call the views_embed_view()... read more
Using #states to disable a field collection field
I am trying to disable a date field’s second value, inside a field collection, but it isn’t working. My hook_form_alter has this:... read more
Disable select drop-downs, display names only
I am looking for a way to remove the select drop-downs from the datepicker popup and display only months (and the year). As for the appearance, it can be altered in datepicker.1.7.css. How do I disable the select drop-downs and show only the names? read more
How to customize CKEditor format configuration
I’m using Drupal 7 with CKEditor module and I would like to delete some formats in the dropdown box that is currently labeled “Format”. So I modified the config file which is site/all/modules/ckeditor/ckeditor.config.js. I modified the code like this... read more
Programmatically translate taxonomy terms
I have a vocabulary of taxonomy terms I get through taxonomy_term_load($tid); and displays in views page. How do I get and display the terms depending on the user’s language? read more
How to validate file is selected or not on ajax processed jquery validation
I am trying to do jquery validation on file upload for file is select or not. I want when user click on upload before submit check file is selected or not. if not stop ajax request. Any Idea to validate it?... read more
How to update the search title and page title depending on facet options
I am using Search Api Views module to list some publications. User can filter them using facets. For example he can look for publications only in Kenya. I want to update the title of my page (view) depending on this user selection. Here is a screenshot of my... read more
insert big array into database
$array = Array( [a001] => Array( [0] => Array( [id] => 1789823 [start] => 2014-09-29 [end] => 2014-10-02 [status] => 1 ) ) ) function to insert reservation: foreach ($array as $room_id => $item) { foreach ($item as $reservation) {... read more
How can I get the group id of a node using tokens?
I try to use [node:og_group_ref], but that gives me the group node title and I need the GID, I am sure there should be a way to get it but I haven’t found it read more
Index custom content in apache solr
I have several custom modules that load and display data from custom tables. I have successfully managed to use the drupal search on these contents, using the drupal search hooks like, hook_update_index, hook_search_execute, etc. But now we have decided to use solr... read more
One exposed filter for many views/views blocks
I want to have one exposed filter and 2 blocks displaying different content types. They both have ‘date’ field and I want to show same-day content with one date exposed filter. Anyone knows how to achieve this? Do I have to create one or two different... read more
Views Bulk Operations Checkboxes check on click
I do search for a specific option in bulk operations. For now, when I click somewhere in my row, the checkbox for the bulk operation gets selected, but I want a user to directly click on the checkbox. If he clicks somewhere in the row, it shouldn’t select the... read more
How do I create product variants?
I have a product (for example, “Desk”) which has two attributes (size and life). Size has the values small, medium, and large. Life has the values 7 years and 10 years. The price is different for each variation. How can I change the price for each... read more