Notes To Self

As time goes on it's harder to look back and remember how I solved the little glitches that eat up so much time. The idea here is a one stop area to jog my memory on these little problems that can turn out to be big if you have to research them all over again.

Adding Image Captions

Adding a caption to an image in an article has always been a little quirky for me. The Caption Filter module seems to work well. 

Main thing to remember is to add the filter for which ever Text Format you will use. In my case Full Text. Additionally I needed to unset Alignment and HSpace in Image Properties in my CKEditor. The alignment is in the caption tag like:

Caption Filter + Insert Module

 Module

Caption Filter + Insert

After installing the modules the first thing to do is to add the Caption Filter to the text format that we will use which in this case is Full HTML.

Apply Drupal Patch

On VPS patch is available so in the case of the Devel module I cd to balnu@balnu.com [~/public_html/eight/modules/devel] and with the patch file in there I:

balnu@balnu.com [~/public_html/eight/modules/devel]# patch -p1 < generated_nodes_not-2345669-1.patch
patching file devel_generate/src/Plugin/DevelGenerate/ContentDevelGenerate.php

Unix Commands Used For Drush 7 Install

These steps are definitely not in the order used. Start with the last two.

  • Stopping a command: ^Z (Control-Z)
  • find: find / -name "drush" Looks for drush directory server wide. Too broad and had to ^Z. find /usr -name "drush" worked much better.
  • ls: ls -la to show all files and ownership.
  • Created symlink: ln -s /usr/local/share/drush/drush /usr/local/bin/drush
  • echo $PATH prints contents of PATH variable.
  • which drush shows path to drush used for accessing it.
  • In /usr/local/share I did wget https://github.com/drush-ops/drush/archive/master.zip which downloaded the zip of drush and named it "master". Renamed it master.zip and then did unzip master
  • Next drush is in /drush-master which I rename /drush and cd into it. Now composer install works and all that's needed is to create the symlink as above.

Upgrading Drush to 7 on Windows 7 and VPS

WINDOWS 7:

Installed composer first which now handles the download of Drush and puts it in C:/Users/John/AppData/Roaming/Composer/vendor/drush/drush. I uninstalled the Drush 6 version with the Windows Control Panel program removal.

Lastly I updated the Windows PATH environment variables by appending C:\Users\John\AppData\Roaming\Composer\vendor\drush\drush; to the end. That was so Drush could be accessed in each sites web root directory.

KNOWNHOST VPS:

Drupal 8 Contrib Development

Drupal 8 is at alpha 11 and it's time to think about moving ahead with MAYO 8.x-1.x. 

Responsive or Adaptive Images

Sooner or later I will have to come to grips with images for responsive sites. Here are some of the modules for Drupal 7 that I have tried and some references to the projects and what smarter minds have to say about the responsive/adaptive problem.

Simple Use of Features Module

I'm not very experienced with the Features module, but today it worked well for export/import of a content type and a view associated with it. The only minor hitch came when some of the View settings didn't carry over for a couple of fields. This was minor though and corrections were obvious.

After that I used Node Export to move my content nodes that had been created for the content type. All went fairly smooth.

Using the Node Export Module

I have finally got to try the latest version of Node Export. I had a node with multiple images in a field and at first I had trouble exporting the images. On the export side I had failed to check the "Files exported for content types" setting in /admin/config/content/node_export". After that I used the file download method and it worked like a charm.

Couldn't get any joy out of the sister module "Node export features" and disabled it.

Learning Views

Doing a bit of study on Drupal 7 Views and just need to get a few of my references down.

Issues:

Pages