additional
Home > Forum > Joomla components > JoomlaQuiz Deluxe > How to create new template in Joomla Quiz Deluxe ?
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: How to create new template in Joomla Quiz Deluxe ?

How to create new template in Joomla Quiz Deluxe ? 3 years 10 months ago #24895

  • Nath
  • Nath's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
How to create new template in Joomla Quiz Deluxe version 3.3.2.005 ?
As I see how to create new template in Joomla Quiz Deluxe version 3.1.x by -> www.joomplace.com/video-tutorials-and-do...x.html?templates.htm

But now I am using Joomla Quiz Deluxe version 3.3.2.005 and it does not have "site_root\media\joomlaquiz folder" or "jq_template.php file" for create my custom template as describe in the link.
So How to create new template in Joomla Quiz Deluxe version 3.3.2.005 ?
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 10 months ago #24896

  • Maria
  • Maria's Avatar
  • OFFLINE
  • JoomPlace Team
  • Posts: 1662
  • Thank you received: 388
  • Karma: 36
Hi Nath,

please use the following steps to create a new template in Joomla 3.0 version of Quiz Deluxe.

1) Create a copy of an existing template, i.e. joomlaquiz_pretty_green, by copying the whole folder and renaming it to joomlaquiz_pretty_green_clone

2) In views/template/tmpl/joomlaquiz_pretty_green_clone/main.php file

rename return 'joomlaquiz_pretty_green';
to
return 'joomlaquiz_pretty_green_clone';

3) In plugins folder plugins/joomlaquiz for all question types (tmpl folders) copy paste joomlaquiz_pretty_green and rename to joomlaquiz_pretty_green_clone

For example,

for a Multiple Choice question type:

make a copy of
plugins/joomlaquiz/tmpl/joomlaquiz_pretty_green
and rename it to plugins/joomlaquiz/tmpl/joomlaquiz_pretty_green_clone

4) Once you do that for all question types, you can start changing .css and html of a new template.

Kind regards
JoomPlace Support Team
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 10 months ago #24903

  • Nath
  • Nath's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
I follow your step but nothing happen it still not show any new template name in the "template setting" on backend or in "quiz template dropdown selection"
I use Joomla Quiz Deluxe version 3.3.2.005
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 10 months ago #24905

  • Nath
  • Nath's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
It seems this version does not have "joomlaquiz_template.xml file"
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 10 months ago #24907

  • Nath
  • Nath's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 6
  • Karma: 0
I mean "new template name" does not appear in the "Joomla Quiz template setting" or in the "Quiz Editing" after I do follow your step.
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 5 months ago #25225

OK this took a while to solve so I am sharing it for others. You need to update the joomla database with the new template.
There is a table entry in the dB _quiz_templates which is populated on install with the default set of templates. Not clear if there is any process to update it when you add a new template but if you follow the steps Maria outlined for renaming a default template, but also change bunch of paths to the new template name (do a replace on say pretty_blue and replace all of them with your new name) the clone of the template will be OK PROVIDED you manually add it as an extra line in the database.
I did this by copy in the phpMyadmin then change the name to what I wanted. Now the new template shows up and can be used.
Good luck guys,
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 5 months ago #25226

Alas, there is more. Then go copy every question type in the plugins filers and rename the same template. Yes for all questions.
you will see another set of default template folders, one for each question type, this is where they are formatted. So as a minimum clone them with your new template name, then change any necessary. The path is for say mquestion is ./plugins/joomlaquiz/mquestion/tmpl there is one for each of the question types in /plugins/joolaquiz/
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 3 years 5 months ago #25229

OK enough, there is more, but first. These coders really should spend some time cleaning up the templates. There is a lot of cross linking between templates and the default code. You would expect the style of a template to be driven from the template css files but no, there are many css rules that are in the core. This is not a clean piece of structured code.
Then the quiz views has template specific tests like in /components/com_joomlaquiz/views/quiz/tmpl.default.php we see code like this:
<div class="<?php if(preg_match("/pretty_green/", $quiz->template_name) || preg_match("/pretty_blue/", $quiz->template_name) ) { echo "jq_quiz_container_tbl_content"; } else { echo 'moduletable joomlaquiz_container';}?>">
<?php if ($quiz->template_name) {
if ($is_preview) {

This got me quite annoyed because making a clone of any of the "pretty" templates they no longer work as the original, this is because of the above code. You now need to hack this to include your new template.
Now it is game over because the whole purpose of creating a new template was to isolate my changes from a possible upgrade.
The administrator has disabled public write access.

How to create new template in Joomla Quiz Deluxe ? 4 months 3 weeks ago #26765

  • ANFPP OLE
  • ANFPP OLE's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Very helpful Stephen, thank you. I had the same problem, copying and renaming all the folders as per the online instructions, editing the db but having multi choice answers disappear completely when i chose my new template. Must be because of the linking with core files, since i haven't changed anything in the clone of the template yet.
Does anyone know if this is improved/fixed in later versions of the component? V. frustrating.
Thanks.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.141 seconds

We do our best to secure your data and to be
GDPR compliant.
However, we are not fully there yet.

With that said we'd like you to know that we use cookies.
We store user session cookie only to enable both registered and guest users to use the shopping cart.
Please note that 3rd party cookies may still be encountered on the pages with social media "share" and "like" buttons.

To ensure your privacy we have currently stopped using any analytics tools like Google Analytics.

We anonymize your IP address on the server side so your IP is not tracked by any means.

We DO NOT pass ANY of your data to 3rd parties.
We will do our best to provide maximum transparency in future if anything will change.

Also, we will store cookies to determine if you saw this message.