First of all, if you chose the standard "Execute PHP" then you should change "return" to "echo".

But more importantly, found the problem! I bet you've enabled the cdn_hosted option!
See, when it's on, Geeklog doesn't care one bit which UI module you've turned on.
Instead, it always loads all of the modules (by calling the overall jquery-ui.min.js).

So the iframe code only works with jquery-ui.min.js itself. However, Geeklog provides no automated way to call the local version. So one has to call it manually. But the automated way must still be used in order to load the relevant CSS files. I chose effect-fade because it's the smallest file.

The above code works just find for me on Geeklog 1.8.1. I press the open dialog button and the dialog pops open with the iframe inside it.

If you want to add more features to the dialogue like being able to drag it around the screen with my code you would need to add:

PHP Formatted Code

$_SCRIPTS->setJavaScriptLibrary('jquery.ui.draggable');

to the code.

As you suggested we should add the ability to the code to add the entire jquery ui library if that is what the developer desires (jquery-ui.min). Did you want to add a feature request? One of the Geeklog Core Developers.

I can't edit my post but 'jquery.ui.effect-fade' should be replaced with 'jquery.ui.core' (which is loaded anyway if effect-fade is called, so let's spare the middleman).

Anyway, you say your original code works for you even with cdn_hosted disabled. Are you aware that at least in Geeklog's old v1.8.2 demo site, it uses a special jQuery plugin that uses cdn_hosted even if cdn_hosted is disabled? That's why it works there (i.e. because it ignores your orders and calls the overall jquery-ui.min.js).

Your original code fails (at least for me) in Geeklog's new demo site.
Please check it in v2.0.0 which is Geeklog's official version now.

<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>

<?php

echo'';

You are right about the code in my previous post. It will not work in Geeklog 2.0.0. Geeklog 2.0.0 contains a much newer version of jQuery and jQuery UI. If you add this line to the code to my previous post example (it is a requirement of the dialog now), it will now work: