DOS: Timestamp Script

Here's a script that gets current time/date and appends to a user-provided filename This example uses the generated filename to call 7-zip and create a zip archive
Tags

XAMPP Portabilization

Simplify XAMPP config files by assigning variables at the top of the scripts. Some scripts have multiple references, so using these variables will allow for easy duplication or moving of the xampp application folder.
Tags

D8: Video Embed HTML Snippet

Code

<div class="field__item">
<div class="video-embed-field-responsive-video">
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="480" src="https://www.youtube.com/embed/8TjL98FCf5w?autoplay=0&amp;start=0&amp;rel=0" width="854">
</iframe>
</div>
</div>

 

Video Output

 

Tags

PHP: Changing installation folder

After pushing a dev instance of drupal to a server, the admin CSS broke.

Browser Console showed *.css files that were obviously auto-generated, but no amount of browser cache clearing, CHMOD, or D8 cache clearing resolved.

Here's an excerpt from the D8 forums - with the actions that were taken noted with ***

The method that has worked for me in past is below:
There may be an unneccessary step of two , but I prefer safe over sorry.

Tags

PHP: Including PHP Resource Files

include v.s. require

  • include and require only differ in that
    • require -  script will HALT if the file specified is not found
    • include -  script will CONTINUE if the file specified is not found

 

include

include 'include/init.inc.php';
  • include will include the file - even if already included - as an overwrite.
  • Previous variable declarations and functions will be replaced.

 

include_once

include_once 'include/init.inc.php';
  • include_once will ONLY include the file if NOT already included.
  • if file already included, this statement is basically ignored

 

require

require 'include/init.inc.php';
  • Require will include the file - even if already included - as an overwrite.
  • Previous variable declarations and functions will be replaced.

 

Tags

Drupal Admin Tutorial

Based off a YouTube video where setup and config is covered; made personal notes and screen captures; and trapped errors, troubleshooting and resolutions for any problems encountered.

Tags
Subscribe to