How do I get the default user picture?

How do I get the default user picture?

I am using the following code to get the URL of the image associated to a user. $user=DrupaluserEntityUser::load(Drupal::currentUser()->id()); $picture=$user->get(‘user_picture’)->entity->url(); If the user didn’t upload a picture, this... read more
How do I get the default user picture?

How do I alter the behavior of the form fields contained within the paragraph field?

Using the Paragraphs module in Drupal 8, I am attempting to alter the behavior of the form fields contained within the paragraph field. This is so I can add behavior like AJAX callbacks, hide show other fields using states etc. I can access the paragraph parent field... read more
Regions do not display in "Demonstrate block regions"

Regions do not display in "Demonstrate block regions"

I wonder why some regions of my theme don’t display in section ‘Demonstrate block rerions’. This happens with some themes which I downloaded from Drupal.org, for example with the Software theme. Here is part of its ‘info’ file (showing... read more
How do I get the default user picture?

Problem with feeds taxonomy import

Why is that I cant import taxonomy terms with feeds, it says it imported 23 terms, but they are nowhere to be found…. I used term name, url alias, term id in mapping then imported it via feeds, nothing happens, it says that the terms were imported but tehy are... read more
Displaying Content Flagged by User Name with Flag Module

Displaying Content Flagged by User Name with Flag Module

I’m using Drupal 7.38 with the Flag (v7.x-3.6) module, along with Views. I’m setting up a flag for content. My goal is to display a list of users whom are flagging content (along with aggregated count of number of items flagged). With the desired ULTIMATE... read more
Views merge rows: merge uniques values and show the first one

Views merge rows: merge uniques values and show the first one

I’m using Views merge rows to grouping rows by some fields, It worked good for me, but in some fields I want to show just the first filled value that means: merge uniques values+use the first value. View after using VMR Orginal view Is there a way to do that... read more
Custom user_register_form for Auto Assign Role registration pages

Custom user_register_form for Auto Assign Role registration pages

I’m using a function[a] to get custom templates to work for all pages, including role registration pages set by Auto Assign Role. By setting the role registration path to user/register/<rolename> I’m able to use... read more
How do I get the default user picture?

Flexslider carousel using template.php

Views with flexslider takes lot of times in rendering items/images. Situation is that I have more than 5 flexslider carousels on the front page. So I changed to go without view with flexslider. I am trying to use flexslider carousel using template file. Due to... read more
How do I get the default user picture?

Adding fields to Flag Lists

I’m using the Flag Lists module to manage user wish lists. I need to add additional fields to the lists such as “body” I go to /admin/structure/flags/manage/fl_template/fields add the required fields, save, rebuild flag lists, flush caches and... read more
How do I get the default user picture?

Revoke flag access to node author [closed]

I have a workflow system for my nodes, where one of the states is Disabled. There are some flags on those nodes as well; I’d like to to revoke access to flags to the node author when the workflow state is changed to Disabled. I’m looking for any solution,... read more
How do I get the default user picture?

Taxonomy terms with conditional field

50 terms and each term needs to have radiobuttons or “other”. Food – o in price – o extra price Drinks – o in price – o extra price WiFi – o in price – o extra price So “in price” and “extra... read more
How do I get the default user picture?

Is there any alternative of node_save to update database fields in iteration?

In Drupal 7, we have big product catalog where we need to update price and stock frequently via Cronjobs. If we update only 5000 prices then also it takes around 20 min. In each iteration we use node_load() and node_save() functions to update for each product in... read more
How can I replace the date picker with a text field that shows a date picker when it has the focus?

How can I replace the date picker with a text field that shows a date picker when it has the focus?

I installed the Date Picker module, which works fine. This is what appears when I add the datepicker element to the form. This is the code I use to add the datepicker element. $form[‘date’] = array( ‘#title’ => t(‘Select your... read more
How do I get the default user picture?

Why are we using utf8mb4_general_ci and not utf8mb4_unicode_ci?

Drupal is moving to support utf8mb4, however, it is using utf8nb4_general_ci. Why take the time to move over to support it, and then not fully support it? Is there a specific reason, or just continuing utf8_general_ci from previous? Would there be any problems with... read more
Get file ID and path to use in View template

Get file ID and path to use in View template

I am working in my Row style template (views-view-fields–MYVIEW–block-1.tpl.php). I need to get the file ID and path of an image. The image field is a multi field, so I need to get all of the images for each row. How do I do this? I also will need to get... read more
How do I get the default user picture?

How do I print the edit link on a node page if the currently logged-in user has the permission to edit the node?

I’m using Display Suite custom fields to have the edit link rendered somewhere else on the node page. Is there an easy way to verify the currently logged-in user has the permission to edit the node?. So far I tried this code. global $user; if... read more
How do I get the default user picture?

Sending data via post and redirecting user

So I made a module that needs to gather some data and redirect user and that data to a payment site. function payment_upload_form($form, &$form_state){ $form = array(); $form[‘#action’] = ‘www.somepaymantsite.com’;... read more
How do I get the default user picture?

Upload Data From Excel Sheet to taxonomy

I have 4 Excel sheets like: First (35) Records: State Code | State Name Second (650) Records: State Code | District Code | District Name Third (6500) Records: State Code | District Code | Block Code | Block Name Fourth (650000) Records: State Code | District Code |... read more
How do I get the default user picture?

how to get the submitted value of tableselect

function test($form, &$form_state){ $form = array(); $header = array(………….); $values = array(………….); $form[‘table’] = array( ‘#type’ => ‘tableselect’, ‘#header’... read more
How do I get the default user picture?

View that link to content in other languages

I have a multilingual site where some content types are translated, and others will remain English only. I’d like to have lists of English content on other language sites. I’ve created a view that will list content from types that can not be translated,... read more