Skip to main content
實踐-重要 DemoMatters

Main navigation

  • Home
  • Democracy
  • 保險業 新聞
  • 元元園地
  • 討論
  • 維基
User account menu
  • Log in

Breadcrumb

  1. Home

dyh_phpDrpl

By Misc_Admin, 18 August, 2025

Clarification: All about Drupal
To Be filed
Drupal 9, 10 develop tools

  • Composer 👀

    • Install Drupal module via Composer
  • Drush 👀

Debug

  • ChatGPT
    • The quick & dirty way (NOT for production)
      print '<pre>';
      print_r($Objct);
      print '</pre>';
      exit;

      • php way - not always work with Drupal
        • not for filter code for sure
    • Better: kint() (requires Devel module) - did not try
      • need install Devel module
        can use kint() or dpm()
        kint(\Drupal::currentUser());

        • kint() only works if Devel is enabled and
        • Kint debugging is turned on
    • Logging instead of printing - pretty good
      • do not break page rendering

      \Drupal::logger('LgGrpNmAny')->debug(
      '<pre><code><pre>@Objct</pre></code></pre>',
      [ '@Objct' => print_r(\Drupal::currentUser(), TRUE), ]
      );

      • in Drupal: -Reports -Recent log messages
    • 'current user' specific
      • \Drupal::currentUser() **doesn’t give you a full User entity
        • it gives you a AccountProxy object (basically a lightweight wrapper).
      • if you want details:
        $user = \Drupal::currentUser();
        print $user->id();
        print $user->getAccountName();

Learn - General
Tutorial 🌐

  • Intro - many topic
  • Docker - DDEV
  • Built-in module
  • etc...
  • video 19 - create new content type
  • video 20 - managing fields and field settings
  • video 24 - Taxonomy
  • video 33 - introduction to views

Layout & Theme 🌐

  • v9 and above use twig

D9+ module development - Youtube 🌐
Wiki related 👀

  • video/Youtube, modules used, people involved

SSL/HTTPS

  • Drupal Doc 🌐

    • Encourage use HTTPS for all pages
    • "Let's Encrypt" mentioned and should work
    • HTTP to HTTPS redirect still hackable
      • mitigation mentioned (e.g. HSTS)
    • many settings/cofig is also possible through settings.php
  • see misc1 Drupal setup in Alwyzn 2 Setup

Taxonomy

  • create terms from node field
    • don't seems to have a module
    • Can generate terms from field data?
      • for use in view filter

OIDC
Permission
Learn - Module
Install moudle

  • ...

Freelinking

  • Module 🌐

    • What it does
      • Freelinking provides a filter framework for easier creation of HTML links to other pages on your site or to external sites.
      • DH: it detect special (linking) syntax in text and act on it, like:
        • replace with HTML syntax - depend on specified filder
        • on target link not exist, perfrom tasks
    • Drupal 8 Doc 🌐
    • Drupal 7 Doc 🌐
    • Fileters 🌐

      • look like apply to both Drupal 7 and 8
    • Custom filter 🌐

      • Drupal 8 - I think

Forum

  • Youtube 1 🌐

    • good
  • Youtube 2 🌐

    • with permission (5:00)

Feeds

  • v7 🌐

    • install, instruduction
    • -structure -feeds import -new -name -description -create
    • -Basic settings -Attach to content type=standalone form??
      • -Periodic import = off -Import on submission = check -Process in background
    • -Fetcher -File upload = check -HTTP fetcher = uncheck
    • -Parser -pick CSV parser //based on file format
    • -Processor // drupal entity to process to
      • -Node processor // more detail on node processor
        • -new node -content type -author = user -Expire nodes = expiration length
        • -mapping //map fields
  • v7 🌐

    • import csv
    • -new content type -save/create -add fields
    • -structure -feed importers -new or an old one -edit
      • -Basic settings -Attach to content type=standalone form?? // article
      • -Periodic import = off -Import on submission = check -Process in background
      • -Fetcher -File upload = check -save -File upload Settings -Allowed file extensions -path //can preset
      • -Parser -CSV parser = check -save -CSV parser Settings -default delimiter = , -header row
      • -Processor -Node processor = check -save -Processor settings
        • -Update exsiting nodes = check -Text format = Plain text -Content type = Feed //input?
    • go to site/import/
  • v7 🌐

    • import RSS
    • -structure -feed importers -new
      • -Basic settings ...
      • -Fetcher -HTTP Fetcher = check -save -Settings // auto detect feeds?
      • -Parser -Common syndication parser = check -save -Common syndication Settings
      • -Processor -Node processor = check -save
        • -Processor setting -Update exsiting nodes = check -Text format = Plain text -Content type = Feed
        • -Mapping
  • Another 🌐

Building Wiki 🌐
v7 Wiki 🌐
Learn - Install Drupal
Installation - Drupal Doc 🌐

  • 3.1 Server Requirement
  • 3.2 Additional Tools
  • 3.3 Ways to Download Core Software 🌐

    • Download - Drupal Doc 🌐

      • traditional install
    • via Composer - Drupal Doc 🌐

      • composer templates
        • recommended (project)
          //Directory structure
          web
          - index.php
          - core/
          composer.json
          vendor/
        • legacy (project)
          //Directory structure
          index.php
          core/
          composer.json
          vendor/
      • install
        //e.g.
        > composer create-project drupal/recommended-project:8.8.0 TrgtFldr
        - check Packagist.org
        >cd TrgtFldr
        //add (Drupal) module
        > composer require drupal/MdlNm
        //add (Drupal) Dev module
        > composer require --dev drupal/MdlNm
        //check outdated packages
        > composer outdated 'drupal/*'
        //update all module include the core
        > composer update
        //update only core
        > composer update drupal/core-recommended --with-dependencies
        //update core and its dependencies
        > composer update drupal/core 'drupal/core-*' --with-all-dependencies ??diff to the above??

        • can use git too!!
  • 3.4 Preparing to Install
  • 3.5 Download with Composer 🌐
  • 3.6 Manually download Drupal Core
  • 3.7 Run interactive installer 🌐

    • Before run the script, I think I need make sure the site is setup for Apache !!
  • Log in or register to post comments

Wiki_VwBlck

dyh_phpDrpl
TestWikiViewable
Wiki_Home
ydh_Home
ydh_ScndPg
ydh_ThirdPg
yyl_Home
RSS feed
Powered by Drupal