[SOLVED] Change user role after changing user name

Hello,

is it possible to change users role, after editing the user name? If yes, how can i realize it? Eventually with rules or custom code?

Thanks

Custom Block content; to be updated on-change of dropdown

Drupal 7: Already written a custom_block that brings content from some REST API (doesn't matter from where the content is coming). Now there's a parameter in REST API call, users should be allowed to change. 

So initially block will load with some default content, default parameter value; and then users can change value of this parameter to fetch new results (preferably AJAX). I can't figure it out. If somebody can point me in right direction or provide right flow.

XSS Filtering for forum post titles

I am trying to prevent some script injection in forum titles in our Drupal 7 installation.  If a user inserts something like

 \"><img/src='1'onerror=alert(1)>

In the title of their forum post, then view the post, an alert message will be shown.  How can I prevent this from happening?

Commerce Kickstart 1.x and core 7.61 - how to? Would like PHP 7

Hello,

what do you recomend me?

I have simple and small Drupal 7 site based on Commerce Kickstart 1.x distribution (distribution = "installation profile").
It is on usual share hosting (without shell, without drush).

Namely, Commerce Kickstart version is last, 7.x-1.53  - it has drupal core 7.60.

PHP is now 5.6.39

I would like to switch to PHP 7.x (as soon as it would be possible). Of course, to PHP 7.2 or to PHP 7.3.
(7.0 is not posiible due to Drupal and 7.1 is not possible neither)

Site with no files in root but re-directs to a sub-folder

I've set up a new site where there are no Drupal files in the web root - two installations are in  ../live and ../dev.  The .htaccess file in the root re-directs to  the live folder.  

Is this good practice?  Are there any SEO implications of working in this way?   Thanks.

Where in the views processing cycle can I read the views filter parameters (Drupal 7)?

Because the exposed filters area takes up too much space on the screen, I want to collapse the exposed filters area and display a plain text version of the views parameters, rather than waste spacing show the filter controls's settings.

Where in the views cycle will all the parameters be present and in what variables so I can read them and display them in some divs above the exposed filters area?

Using some Javascript to read the filter parameters in the menu andplacing them in a div will help, but I prefer to do it in PHP code itself.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x