Account created on 13 May 2022, over 2 years ago
#

Recent comments

Hi Sascha,

Yes, you can restrict comments to only the node author. You can achieve this with a custom module or using the Rules module. Here's a quick example using a custom module:

  1. Permissions: Ensure only authenticated users can post comments in the permissions settings.
  2. Custom Module Code:
    
    

    php

    function mymodule_node_view($node, $view_mode) { if ($view_mode == 'full' && user_is_logged_in()) { global $user; if ($node->uid != $user->uid) { unset($node->content['comments']); } } }

This code checks if the current user is the node author and hides the comment form if they are not.

I use an online service to download youtube video thumbnails with correct dimensions, all these dimensions follow youtube's pre-defined algorithm. The dimension of youtube HD image is 1280X720 Pixels. it may be helpful for someone.

Production build 0.71.5 2024