Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

New base template, default engine = flash 8 years 5 months ago #3786

  • r.j.
  • r.j.'s Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
When adding a new template (as in Nottingham variant), method found here , i find that every new LO template added gets the flash default engine..

I guess this is due to line 69 a.f. of /website_code/php/templates/new_template.php (see below).
Is there a reason to only make javascript default with templates named Nottingham and not every template of the type xerte?


/
*
 * create the new template record in the database
 */
$extraflags = "";
if ($row_template_type['template_framework'] == 'xerte')
{
    if ($row_template_type['template_name'] == 'Nottingham')
    {
        $extraflags = "engine=javascript";
    }
    else
    {
        $extraflags = "engine=flash";
    }
}

Please Inloggen or Create an account to join the conversation.

Last edit: by r.j..

New base template, default engine = flash 8 years 5 months ago #3787

  • JohnSmith
  • JohnSmith's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 397
  • Thank you received: 71
Hi,

Those instructions are 2 1/2 years old and perhaps requiring some updating. The reason for extraflags = flash for all the non-Nottingham templates is because of legacy mediaInteractions and multipersp templates (github.com/thexerteproject/xerteonlineto...8536070692bd6df9b233) which descend from Xerte but do not play in the new javascript/HTML5 player.

Perhaps it would be better to check for these rather than 'Nottingham' and flip the logic:
*
 * create the new template record in the database
 */
$extraflags = "";
if ($row_template_type['template_framework'] == 'xerte')
{
    if ( ($row_template_type['template_name'] == 'multipersp') ||
        ($row_template_type['template_name'] == 'mediaInteractions') ||
        ($row_template_type['template_name'] == 'Rss') )
    {
        $extraflags = "engine=flash";
    }
    else
    {
        $extraflags = "engine=javascript";
    }
}
The following user(s) said Thank You: r.j.

Please Inloggen or Create an account to join the conversation.

New base template, default engine = flash 8 years 5 months ago #3788

  • r.j.
  • r.j.'s Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
  • Thank you received: 0
Far better, thanks!

Did you already commit this on github?

Please Inloggen or Create an account to join the conversation.

New base template, default engine = flash 8 years 5 months ago #3789

  • JohnSmith
  • JohnSmith's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 397
  • Thank you received: 71
Nope just came up with it but I can do if you are happy that it is better?

Please Inloggen or Create an account to join the conversation.

New base template, default engine = flash 8 years 5 months ago #3790

  • JohnSmith
  • JohnSmith's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 397
  • Thank you received: 71
That's it committed to Github.

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.066 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search