Search This Blog

Friday, 22 July 2011

Adding CoolIris embed to PhpBB

 Under the 'posting' section in the ACP.

Create a new BBCode :

BBCode :
[cooliris]http{SIMPLETEXT}://picasaweb.google.com/{INTTEXT}/{IDENTIFIER2}[/cooliris]

HTML replacement :

<script type="text/javascript"         src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">
    </script>
  <div id="wall{INTTEXT}{IDENTIFIER2}">    <script>
        var flashvars = {
            feed: encodeURIComponent("api://picasaweb.google.com/?user={INTTEXT}&album={IDENTIFIER2}")
        };
        var params = {
             allowFullScreen: "true",
             allowscriptaccess: "always"
        };
        swfobject.embedSWF("http://apps.cooliris.com/embed/cooliris.swf",
            "wall{INTTEXT}{IDENTIFIER2}", "600", "450", "9.0.0", "",
            flashvars, params);
    </script>
</div>



NB// This JS code is from http://lysergo.blogspot.com/2010/05/bbcode-picasa.html.  I made two changes from the original blog post.  '#' dropped and {SIMPLETEXT} added to the BBCode.


Assuming it saves OK you can now test this by manually adding a URL between the [cooliris][/cooliris] tags.  If it all works OK you can go back to the code edit and enable the 'Display on posting page' and add a little help text.

No comments:

Post a Comment