[pmwiki-users] Embed Sporcle

Mark Trumpold mtrumpold at CACEgypt.org
Tue Mar 15 06:11:14 CDT 2011



On 15/03/11 1:14 PM, "Hans" <design5 at softflow.co.uk> wrote:

Sunday, March 13, 2011, 7:51:11 AM, Mark Trumpold wrote:

> Does anyone know how I can change this code to embed this sporcle game on my website

> <iframe frameborder="0" scrolling="no" marginheight="0"
> marginwidth="0" id="spFrame"
> src="http://www.sporcle.com/framed/?gid=38ae49c090c&pid=0cbc0c029d4bc453d24975f38c84dc18"
> width="860"></iframe><script type="text/javascript">function
> rIF(ht){document.getElementById("spFrame").height=parseInt(ht)+40;}</script>

you could create a  custom markup and put a directive for that into
the page. Something like this:

in config:

$SporcleFmt = '
  <iframe frameborder="0" scrolling="no" marginheight="0" marginwidth="0" id="spFrame" src="http://www.sporcle.com/framed/?gid=38ae49c090c&pid=0cbc0c029d4bc453d24975f38c84dc18" width="860"></iframe>
  <script type="text/javascript">function rIF(ht){document.getElementById("spFrame").height=parseInt(ht)+40;}</script>
';

Markup('sporcle', 'directives' '/\\(:sporcle:\\)/e',
 "Keep($SporcleFmt)";


in  a wiki page:

(:sporcle:)


cheers
  ~Hans


Hi Hans

Man you guys are good and fast ...

Is there a way it could be site wide? From what I understand you saying is that it is a page only directive

I plan on using them on various topics as a review for students.

M

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20110315/d2fcb17f/attachment.html>


More information about the pmwiki-users mailing list