<html><body style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;">the play_, preview_ and other shared code can be moved into module_functions.php which is a sort of library of similar things.<br />Common code should logically go in library/JS or some such?<br /><br />The export link doesn't matter for templates - the link is the same<br /><br />the properties panel is driven by options in the .info file now<br /> <br />Pgogy Webstuff http://www.pgogywebstuff.com<div>Makers of Web things of a fair to middling quality</div><br /><blockquote><br />----- Original Message -----<br /><div style="width:100%;background:rgb(228,228,228);"><div style="font-weight:bold;">From:</div> "For Xerte technical developers" <xerte-dev@lists.nottingham.ac.uk></div><br /><div style="font-weight:bold;">To:</div>"For Xerte technical developers" <xerte-dev@lists.nottingham.ac.uk><br /><div style="font-weight:bold;">Cc:</div><br /><div style="font-weight:bold;">Sent:</div>Fri, 8 Feb 2013 11:47:46 +0000<br /><div style="font-weight:bold;">Subject:</div>[Xerte-dev] Re: Modular Play and New Templates<br /><br /><br /><div class="WordSection1"><p class="MsoNormal"><span style="color:#1F497D;">I got it working, you can check it out and do an xampp install for a quick preview of what’s there so far.</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">Few observations on hooking it up:</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">- Ages ago, Pat, we talked about firing the data at an ad-hoc page – there is code in the wizard that posts it to wizard.runtime if set, so we did do it. Before I realised this, I set a property called runtime and used it to point the preview to preview_bootstrap.php. I can’t remember if anyone is actually using .runtime to use a different playout or not (I have vague memories of GEM doing this for their PBL stuff?). I could have just posted the data to a page, but then you lose all the security stuff.</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">- There is much the same code in the various play_, play_html5, play_bootstrap files that we ought to tidy up at some point.</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">- I’ve put my own set of .js libraries etc in the /common folder, so that duplicates some things like jQuery, so it would be better to load common libraries from a central place.</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">- I have no idea how hard it is to get appropriate urls showing in the properties tab for the play_, export, etc and have all that working when the template isn’t Nottingham.</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">- Otherwise it’s pretty straightforward to add new tools, especially if you can work with the xwd /  wizard for an editor, and jQuery makes it really easy to pick up the xml and drive the content. Once this penny drops I can see other people wanting to build their own templates and add them in, so it would be worth smoothing out some time. I can do that probably, but I’m not so sure what needs to be in place to make the properties panel more flexible?</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><p class="MsoNormal"><span style="color:#1F497D;">Cheers,</span></p><p></p><p></p><p class="MsoNormal"><span style="color:#1F497D;"></span></p><p> </p><p></p><div><div style="border:none;border-top:solid #B5C4DF 1pt;padding:3pt 0cm 0cm 0cm;"><p class="MsoNormal" style="margin-left:36pt;"><b><span style="font-size:10pt;font-family:Tahoma, 'sans-serif';" lang="en-us" xml:lang="en-us">From:</span></b><span style="font-size:10pt;font-family:Tahoma, 'sans-serif';" lang="en-us" xml:lang="en-us"> xerte-dev-bounces@listsnottingham.ac.uk [mailto:xerte-dev-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Pat @ Pgogy<br /><b>Sent:</b> 08 February 2013 09:15<br /><b>To:</b> For Xerte technical developers<br /><b>Subject:</b> [Xerte-dev] Re: Modular Play and New Templates</span></p><p></p><p></p></div></div><p class="MsoNormal" style="margin-left:36pt;"></p><p> </p><p></p><div><p class="MsoNormal" style="margin-left:36pt;">Preview and play differ in terms of logged in access and password protection - but the display code should be in a library function.</p><p></p><p></p></div><div><p class="MsoNormal" style="margin-left:36pt;"></p><p> </p><p></p></div><div><p class="MsoNormal" style="margin-left:36pt;">Agree your code base should be shared - wondering if modules could share that. In theory you could add a play parameter to the info file and then probably share the rest of the code?</p><p></p><p></p></div><div><p class="MsoNormal" style="margin-left:36pt;"></p><p> </p><p></p></div><div><p class="MsoNormal" style="margin-left:36pt;">That might work better?<br /><br />Pgogy Webstuff - <a href="http://www.pgogywebstuff.com">http://www.pgogywebstuff.com</a></p><p></p><p></p><div><p class="MsoNormal" style="margin-left:36pt;">Makers of web things of a fair to middling quality</p><p></p><p></p></div></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12pt;margin-left:36pt;"><br />On 8 Feb 2013, at 09:04, Julian Tenney <<a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a>> wrote:</p><p></p><p></p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal" style="margin-left:36pt;"><span style="color:#1F497D;">Well, it’s more that we have the same code in several places, and things like being able to get the runtime url in the wizard. I added a property to the wizard ‘runtime’ to point to my booststrap.php page. </span></p><p></p><p></p><p class="MsoNormal" style="margin-left:36pt;"><span style="color:#1F497D;"> </span></p><p></p><p></p><p class="MsoNormal" style="margin-left:36pt;"><span style="color:#1F497D;">A related question: is there anything different between preview and play, or could I just use the same file for both?</span></p><p></p><p></p><p class="MsoNormal" style="margin-left:36pt;"><span style="color:#1F497D;"> </span></p><p></p><p></p><div><div style="border:none;border-top:solid #B5C4DF 1pt;padding:3pt 0cm 0cm 0cm;"><p class="MsoNormal" style="margin-left:72pt;"><b><span style="font-size:10pt;font-family:Tahoma, 'sans-serif';" lang="en-us" xml:lang="en-us">From:</span></b><span style="font-size:10pt;font-family:Tahoma, 'sans-serif';" lang="en-us" xml:lang="en-us"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">mailto:xerte-dev-bounces@lists.nottinghamac.uk</a>] <b>On Behalf Of </b>Pat @ Pgogy<br /><b>Sent:</b> 07 February 2013 17:51<br /><b>To:</b> For Xerte technical developers<br /><b>Subject:</b> [Xerte-dev] Re: Modular Play and New Templates</span></p><p></p><p></p></div></div><p class="MsoNormal" style="margin-left:72pt;"> </p><p></p><p></p><div><p class="MsoNormal" style="margin-left:72pt;">I would assume we accordion the templates list?<br /><br />Pgogy Webstuff - <a href="http://www.pgogywebstuff.com">http://www.pgogywebstuff.com</a></p><p></p><p></p><div><p class="MsoNormal" style="margin-left:72pt;">Makers of web things of a fair to middling quality</p><p></p><p></p></div></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12pt;margin-left:72pt;"><br />On 7 Feb 2013, at 16:12, Julian Tenney <<a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a>> wrote:</p><p></p><p></p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal" style="margin-left:72pt;"><span style="color:#1F497D;">Yeah, that’s pretty much what I’m doing. It will work and that’s fine, just wondering about the situation where there loads of these things…</span></p><p></p><p></p><p class="MsoNormal" style="margin-left:72pt;"><span style="color:#1F497D;"> </span></p><p></p><p></p><div><div style="border:none;border-top:solid #B5C4DF 1pt;padding:3pt 0cm 0cm 0cm;"><p class="MsoNormal" style="margin-left:108pt;"><b><span style="font-size:10pt;font-family:Tahoma, 'sans-serif';" lang="en-us" xml:lang="en-us">From:</span></b><span style="font-size:10pt;font-family:Tahoma, 'sans-serif';" lang="en-us" xml:lang="en-us"> <a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">xerte-dev-bounces@lists.nottingham.ac.uk</a> [<a href="mailto:xerte-dev-bounces@lists.nottingham.ac.uk">mailto:xerte-dev-bounces@lists.nottingham.ac.uk</a>] <b>On Behalf Of </b>Pat @ Pgogy<br /><b>Sent:</b> 07 February 2013 15:47<br /><b>To:</b> For Xerte technical developers<br /><b>Subject:</b> [Xerte-dev] Re: Modular Play and New Templates</span></p><p></p><p></p></div></div><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p><div><p class="MsoNormal" style="margin-left:108pt;">Duplicate the modules xerte folder into modules new template name</p><p></p><p></p></div><div><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p></div><div><p class="MsoNormal" style="margin-left:108pt;">Keep the edit php file as it is still xerte</p><p></p><p></p></div><div><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p></div><div><p class="MsoNormal" style="margin-left:108pt;">Mangle play and preview to present the HTML<br /><br />Pgogy Webstuff - <a href="http://www.pgogywebstuff.com">http://www.pgogywebstuff.com</a></p><p></p><p></p><div><p class="MsoNormal" style="margin-left:108pt;">Makers of web things of a fair to middling quality</p><p></p><p></p></div></div><div><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12pt;margin-left:108pt;"><br />On 7 Feb 2013, at 09:46, Julian Tenney <<a href="mailto:Julian.Tenney@nottingham.ac.uk">Julian.Tenney@nottingham.ac.uk</a>> wrote:</p><p></p><p></p></div><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal" style="margin-left:108pt;">Question for Pat I think:</p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;">With the html5 playout, Fay has added play_html5.php that does the work, that’s all fine. I’ve got a new template I’d like to build in that produces this stuff:</p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;"><a href="http://www.nottingham.ac.uk/~cczjrt/boostrapLO">http://www.nottingham.ac.uk/~cczjrt/boostrapLO</a>. The editor is a standard xerte wizard / xwd thing, but it uses its own html page to parse the xml and create the content.</p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;">So I could add another html page to the folder and repeat what Fay has done for html5, but that seems a bit messy to sustain if, one day, we have loads of runtimes doing different things, I wondered if your modular stuff handled this in a more graceful way?</p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;">There’s another difference here: Fay’s html5 code plays existing content – so you have two alternative urls for the same piece, ultimately we’ll switch toolkits to use the html5 one as the default, and the old one will remain as a legacy. In my case, it doesn’t work like that, these projects will always only use their html page: so that needs to be the url to display in properties for the project, and I guess that’s what needs to export as well.</p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;">What do you think is the best thing to do?</p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;"> </p><p></p><p></p><p class="MsoNormal" style="margin-left:108pt;">Julian</p><p></p><p></p><p class="MsoNormal" style="margin-right:0cm;margin-bottom:12pt;margin-left:108pt;"><span style="font-size:12pt;font-family:'Times New Roman', serif;"><br /><br /><br /><br /></span></p><p></p><p></p></div></blockquote><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal" style="margin-left:108pt;"><span style="font-size:12pt;font-family:'Times New Roman', serif;">_______________________________________________<br />Xerte-dev mailing list<br /><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br /><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a></span></p><p></p><p></p></div></blockquote></div></blockquote><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal" style="margin-left:72pt;"><span style="font-size:12pt;font-family:'Times New Roman', serif;">_______________________________________________<br />Xerte-dev mailing list<br /><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br /><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a></span></p><p></p><p></p></div></blockquote></div></blockquote><blockquote style="margin-top:5pt;margin-bottom:5pt;"><div><p class="MsoNormal" style="margin-left:36pt;"><span style="font-size:12pt;font-family:'Times New Roman', serif;">_______________________________________________<br />Xerte-dev mailing list<br /><a href="mailto:Xerte-dev@lists.nottingham.ac.uk">Xerte-dev@lists.nottingham.ac.uk</a><br /><a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev">http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev</a></span></p><p></p><p></p></div></blockquote></div>
</blockquote></body></html>