iPhoto: How to play a slideshow in random order

Scenario: In iPhoto you have a folder full of photos that you want to turn into a slideshow – only you would want to play the images in random order. But: there is actually no ‘preset‘ for “random order” or “shuffle mode” in the iPhoto preferences panel – and you ask yourself, if it is actually possible, to play an iPhoto slideshow in random order at all?!

This may first occur a bit strange, but it does actually make perfect sense. Let me explain: you probably don’t really want to have your images played in random order all the time. Instead the random play option is available on demand or actually on play – which means  you can switch to random order (“shuffle order”) while the slideshow is actually playing. Here is how:

How to play an iPhoto slideshow in random order

First you obviously have to have a slideshow you want to play in random order. So in the iPhoto sidebar under ‘slideshows’ you either right-click and choose “New Slideshow” or go to “File > New Slideshow” from to menu bar. Add some picture you want to play by draggin and dropping them from any of the image overviews. Then press ‘Play’.

While the slideshow is playing, move the mouse pointer to make the slideshow controls appear. Then click the settings button, that looks like a cog wheel icon, next to the close [X] button:

iphoto slideshow random order - shuffle preferences

random order slideshow preferences in iPhoto

Clicking the settings button in play mode will then open an extended preferences panel, featuring an additional option “Shuffle slide order” in the lower third of the panel:

iPhoto slideshow random order option

iPhoto’s random order slideshow option “shuffle slide order”

Ticking (Checking/unchecking) the option “Shuffle slide order” will toggle the shuffle mode.

You can find a detailed description on this page “Change slideshow settings“at support.apple.com – it’s written for iPhoto 9.5 but should also apply for iPhoto 9.6 and other versions as well.

iphoto slideshow manual orderIf you instead want to determine the order of the slideshow manually, you can drag and drop the images in the order you prefer at the top image bar.

Hope this short guide helped a bit. Cheers!

Drupal: CKEditor toolbar inactive for other roles than ‘administrator’

I suppose it probably is some permissions problem.

screen-shot-2015-03-27

to be continued…

CKEditor for Drupal 7 Installation Process (Open Source Version)
http://docs.cksource.com/CKEditor_for_Drupal/Open_Source/Drupal_7/Installation

How To Set Up the CKEditor Module In Drupal
http://tomandcrystal.com/how_to_set_up_the_ckeditor_module_in_drupal

Drupal: SCALD modal window loading problem [solved]

The SCALD modal window ‘loading’ wasn’t loading. It took a couple of days (hours) and an embarassing long discussion on drupal.org to find the error – which was not an error. It was ‘just’ a problem of re-declaring something, that was already declared before.

The short version:
“The WYSIWYG module was detected. Using both modules at the same time may cause problems. It is recommended to turn the WYSIWYG module off (click here to disable).”
[reading (and understanding) a warning on the CKEditor profile page can actually be useful!]

The long version: …to be continued…

The documentation of the bug hunt: https://www.drupal.org/node/2454845

removing empty nodes with jQuery

Sometimes you have empty html tags on your code tree and no matter what you try in your cms / php, you can’t avoid them to appear in the rendered html.

But even then you can remove empty instances through some compact jQuery snippets – here are some examples that show how to remove empty links and empty image tags from the html document…

This is how to remove an empty image tag, that generates an error:

 $("img").error(function(){
     $(this).remove();
 });

This is how to remove a link tag that generates an error:

 $("a").error(function(){
     $(this).contents().unwrap();
 });

This is how to hide the parent tag, if the child tag “inscriptions” is empty:

 $("inscriptions:empty").parent().hide();

This is how to remove ’empty’ links that point to a directory instead of a page:

 $("a").each(function() {
     var href = $(this).attr("href");
     if(href == '/node/') { // or anything else you want to remove...
         $(this).contents().unwrap();
     }
 });

This is how to remove ’empty’ image tags that point to non-existing images:

 $("img").each(function() {
     var src = $(this).attr("src");
     if(src == '/images/-thumb.JPG') { // or anything else you want to remove...
         $(this).remove();
     }
 });

See also:

And here’s some related links:

Drupal: cancel button on edit node page

Are you missing a Cancel Button in your Drupal installation? Great. I know the feeling. But as they say: there’s a module for that. For many Drupal related tasks there is already a module available at drupal.org. But some essential tasks can be so ‘small’ that the related module would be even smaller – documenting and uploading it seems to be almost a waste of time. And since writing your own module in Drupal is actually not that difficult, finding a solution for such ‘small tasks’ can be as easy as copy-paste-save-upload. And this also applies to the missing cancel button.

When I needed a cancel button for one project I was working on, I ran into exactly this situation. Or maybe ‘situation’ is to big a word for this – anyways. I needed to add a cancel button to the “new node” and “edit node” screens for all pages. You may think Why not just leave the page instead of clicking a cancel button? And I must agree: from a functional perspective such a button would be redundant.  But from a UX perspective it may very well make sense to have that button: I actually only needed that extra button because the client I worked for was used to having a cancel button from his previous CMS. He was a bit irritated that there was no cancel button in the drupal installation I developed for him. Also telling him “Just leave the page” did not help.

Instead a quick search helped. I found this little snippet from Pascal Duez that does just that: adding a custom cancel button to the “new node” and “edit node” screen of all pages. That was exactly what I was looking for. You can find the module on gihub right here: gist.github.com/pascalduez/1888373

This is what the “new node” and “edit node” screen looks like when the module is activated:

Drupal Cancel Button Example Screenshot

custom cancel-button for Drupal

There is also a slightly more complex, or actually more ‘handy’ version of that script. It also forwards the user to a different, useful page, according to the context in which the cancel button was clicked:

” If the “Cancel” button is clicked, the user is being redirected the following way:

  1. If a “destination” paramter is set, this is used
  2. If no destination parameter is set and we’re in an edit form, the user is being redirected to the node display
  3. Otherwise the user is being redirected to the frontpage “

You can find the slightly more complex module from here:
julian.pustkuchen.com/en/drupal-7-snippet-add-cancel-button-content-edit-create-forms

drupal 7 admin toolbar disappearing [fix]

I recently had the problem, that my admin toolbar would be disappearing randomly. This of course can be a major problem – how do you want to administer your drupal installation when there is no toolbar? Only emptying the cache helped – so having the url to empty the cache at hand can be – handy.

If you happen to have the development module installed (which you should have) then the following path with flush the cache:

/devel/cache/clear

but also the following path lets you empty the cache manually:

/admin_menu/flush-cache

In my case this problem seemed to be a cache related problem. So emptying the cache helped. Luckily I found an easy fix for the problem over at drupal.org – so I didn’t have to empty the cache constantly. Here’s the details:

at the end of settings.php add this:

// admin toolbar fix
 $conf['admin_menu_cache_client'] = FALSE;

i found the quick fix for this problem over here: “Admin menu disappears (randomly), needs either cache to be emptied on every page or page refresh several times”
https://www.drupal.org/node/442560

and the fix was then right here:
https://www.drupal.org/node/442560#comment-2692220