I am creating a quiz created with SlickQuiz, and wish to conditionally display a different SVG file (created with MapSVG) for each question and on the results page of the quiz.
The SVG files need to be displayed on a page using a shortcode, which can't (as far as I could determine) be inserted into the SlickQuiz plugin.
So I think the solution is to conditionally display the SVG on a page by putting the following PHP in a custom page template, above the shortcode that inserts the quiz:
<?php
$q = $question_number;
// load the svg for the next question - question 2
if ($q == 1) {
echo do_shortcode('[mapsvg id="467" title="My Q2 SVG"]');
// quesion 2 is the last question so load the svg for the results page
} elseif ($q == 2) {
echo do_shortcode('[mapsvg id="475" title="My results page SVG"]');
// no question number received so load the svg for q1
} else {
echo do_shortcode('[mapsvg id="475" title="My Q1 SVG"]');
}
?>
I have tested the above, by manually setting the $q variable, and it does indeed display the different SVG files above the quiz.
So what I need is someone who can write the javascript (AJAX call?) from the SlickQuiz plugin (possibly the js/[login to view URL] file) to send the current question number variable to be picked up by the php, each time the "Next >>" button or "Get Your Score>>" button is clicked.
If you think there is better approach to achieve this you should also suggest it before starting the work.
Note that you should develop and test on your own development environment as I cannot provide admin access to my live site.
Solution: Let's add a custom field in slick quiz plugin to add id of mapsvg. Then modify the SlickQuiz plugin to render svg for each quiz. This can be done in 2 ways: either modifying the SlickQuiz plugin or develop an addon for the SlickQuiz. I shall prefer addon if necessary hooks are available in SlickQuiz plugin.
About Me: I am seasoned wordpress plugin developer and have developed from scratch or extended many plugins.
$55 USD σε 3 ημέρες
5,0 (29 αξιολογήσεις)
5,0
5,0
9 freelancers δίνουν μια μέση προσφορά $99 USD για αυτή τη δουλειά
Hello!
With 98% to 99% completion rate, 900+ successfully completed projects, and a 4.99 reputation (maximum possible, 5.0) (can be verified on my profile page https://www.freelancer.com/u/rajeshsonisl.html !!)... you can never go wrong choosing me :)
I am available to get started on your project right away. I look forward to your reply.
Thanks.
Kind Regards,
Rajesh Soni
Hi
I work towards providing reliable, relevant and robust IT solutions at most competitive prices to my customers. I ensure 100% customer satisfaction
so lets start
Thanks
Dear Hiring Manager,
Greetings of the Day!
I am professional website developer/designer. I have 4+ years of experience in this field.
I'm very energized to provide my solutions for your job.
Please you can get in touch with me immediately to talk about this place further.
I hope you'd give me this opportunity.
Please once discussed in message board and I assure you the great deal.
Regards,
Bhavesh Nariya
Hello,
Plugin developer here. I can fill the gap of your Quiz plugin.
I can register shortcode and complete the project.
Ready to start NOW!
Regards
Tonu
Hi,
I have read your description, I have few questions about the project. please initiate chat to discuss more about the project.
Thanks and Regards,
iBitol