The media be it newspapers or tv plays a role in the problem.
Reporting acts of violence like the Tunisia killings draws attention to the cause.The media publishes articles and comments on the background to the situation.Those who are interested look further into what is going on and how the perpetrators justify their actions.
Those who believe that the reasons the perpetrators give are just, may join the cause.
The media plays a small part in some cases but is not a significant factor.
As always there will be arguments about which things play the most significant part.