How to return a PDF file from custom module?

Hi all,
I've a method of a custom module that should read a pdf file in the private file system (private://adir/226/fincav.pdf) and then return the file.
I can get the file data in this way:
$file = file_load($ifid);

and, given the file URI, that I know, I should read the file and return it as pdf download.

How can I do this?

Claudio

How to include RSS feeds inside a node?

I would like to create a node, that display 5 RSS feeds from 5 different external sites.

I have the RSS URL of the 5 external sites and I would like to find a simple way to display the last elements of these feeds inside my node.

I have already looked at the Feeds module but it creates a node for each element of the given RSS feeds ! (so it makes a lot of nodes...)

How can I display last elements of my different RSS Feeds as simple as possible ?

display entity reference as input form within main content type

Hi,
I am using drupal 8, clean (default) installation.
What I want is fairly simple:
I created two content types: "Course" and "Specialization", each with some specific fields.
I added "Specialization" is an entity-reference in content type "Course".

When I create content "Course", I would like to display the content-type "Specialization" as a sub-form within the main-form of content-type "Course".
Instead of showing the default select/search field.

Can you guide me how to do that?

Many thanks in advance!

What is the D8 way to bulk change author on 1000+ nodes?

I have done extensive research, found a dedicated D7 module for that, detailed instructions of how to do that with VBO in D7 (partly included into D8 core but apparently not the part I need) and a lot of instructions on how to do that using brute SQL force.
Am I missing something obvious or is brute SQL the only way to do that in D8??

Web servel Log files on shared hosting & Privacy policies

Hi, this is my very first drupal 8 site. I am not sure, what to write in privacy policy section if I am using shared hosting.

As far as I have searched, I came to know that, since it is shared hosting you as a website owner does not have control over the WEB SERVER LOG files which gets generated automatically by APACHE. Now, since I cannot delete those files. What should I write in my website's privacy policy regarding those Web Server Log data of users.

open social - white browser after theme change

I just installed Open Social on Ubuntu 16.04.2 LAMP.

I just changed to bootstrap theme via the theme menu and now have a white browser window.

Is there a config file where I can manually change the default theme?

Can I rescue this install?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x