[Xerte-dev] Re: Modular Play and New Templates
xerte at pgogywebstuff.com
xerte at pgogywebstuff.com
Fri Feb 8 16:10:57 GMT 2013
the play_, preview_ and other shared code can be moved into
module_functions.php which is a sort of library of similar things.
Common code should logically go in library/JS or some such?
The export link doesn't matter for templates - the link is the same
the properties panel is driven by options in the .info file now
Pgogy Webstuff http://www.pgogywebstuff.comMakers of Web things of a
fair to middling quality
----- Original Message -----
From: "For Xerte technical developers"
To:"For Xerte technical developers"
Cc:
Sent:Fri, 8 Feb 2013 11:47:46 +0000
Subject:[Xerte-dev] Re: Modular Play and New Templates
I got it working, you can check it out and do an xampp install for a
quick preview of what’s there so far.
Few observations on hooking it up:
- 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.
- There is much the same code in the various play_, play_html5,
play_bootstrap files that we ought to tidy up at some point.
- 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.
- 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.
- 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?
Cheers,
FROM: xerte-dev-bounces at lists.nottingham.ac.uk
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk] ON BEHALF OF Pat @
Pgogy
SENT: 08 February 2013 09:15
TO: For Xerte technical developers
SUBJECT: [Xerte-dev] Re: Modular Play and New Templates
Preview and play differ in terms of logged in access and password
protection - but the display code should be in a library function.
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?
That might work better?
Pgogy Webstuff - http://www.pgogywebstuff.com [1]
Makers of web things of a fair to middling quality
On 8 Feb 2013, at 09:04, Julian Tenney wrote:
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.
A related question: is there anything different between preview and
play, or could I just use the same file for both?
FROM: xerte-dev-bounces at lists.nottingham.ac.uk [3]
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk [4]] ON BEHALF OF Pat
@ Pgogy
SENT: 07 February 2013 17:51
TO: For Xerte technical developers
SUBJECT: [Xerte-dev] Re: Modular Play and New Templates
I would assume we accordion the templates list?
Pgogy Webstuff - http://www.pgogywebstuffcom [5]
Makers of web things of a fair to middling quality
On 7 Feb 2013, at 16:12, Julian Tenney wrote:
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…
FROM: xerte-dev-bounces at lists.nottingham.ac.uk [7]
[mailto:xerte-dev-bounces at lists.nottingham.ac.uk [8]] ON BEHALF OF Pat
@ Pgogy
SENT: 07 February 2013 15:47
TO: For Xerte technical developers
SUBJECT: [Xerte-dev] Re: Modular Play and New Templates
Duplicate the modules xerte folder into modules new template name
Keep the edit php file as it is still xerte
Mangle play and preview to present the HTML
Pgogy Webstuff - http://www.pgogywebstuffcom [9]
Makers of web things of a fair to middling quality
On 7 Feb 2013, at 09:46, Julian Tenney wrote:
Question for Pat I think:
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:
http://www.nottingham.ac.uk/~cczjrt/boostrapLO [11]. The editor is a
standard xerte wizard / xwd thing, but it uses its own html page to
parse the xml and create the content.
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?
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.
What do you think is the best thing to do?
Julian
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk [12]
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev [13]
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk [14]
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev [15]
_______________________________________________
Xerte-dev mailing list
Xerte-dev at lists.nottingham.ac.uk [16]
http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev [17]
Links:
------
[1] http://www.pgogywebstuff.com
[2] mailto:Julian.Tenney at nottingham.ac.uk
[3] mailto:xerte-dev-bounces at lists.nottingham.ac.uk
[4] mailto:xerte-dev-bounces at lists.nottingham.ac.uk
[5] http://www.pgogywebstuff.com
[6] mailto:Julian.Tenney at nottingham.ac.uk
[7] mailto:xerte-dev-bounces at lists.nottingham.ac.uk
[8] mailto:xerte-dev-bounces at lists.nottingham.ac.uk
[9] http://www.pgogywebstuff.com
[10] mailto:Julian.Tenney at nottingham.ac.uk
[11] http://www.nottingham.ac.uk/~cczjrt/boostrapLO
[12] mailto:Xerte-dev at lists.nottingham.ac.uk
[13] http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
[14] mailto:Xerte-dev at lists.nottingham.ac.uk
[15] http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
[16] mailto:Xerte-dev at lists.nottingham.ac.uk
[17] http://lists.nottingham.ac.uk/mailman/listinfo/xerte-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte-dev/attachments/20130208/e0044f5c/attachment-0001.html>
More information about the Xerte-dev
mailing list