Archive for myfreeforum.org Before posting please check the "stickies" in the support forums.
Please ask questions in real English and not "txt". You will get a better response.
Please do not ask support questions via PMs.
 

The free forums are now under new ownership, a full announcement will be made shortly

       myfreeforum.org Forum Index -> Portal components
rc_girl

Quiz Portal

I am having problems getting my quiz portal to show on my index page. I have gone and made a quiz portal and added some test questions, it still isn't showing up. I have tried to search topics but they haven't helped.


http://therainbowconnection.myfunforum.org
myff admin

not at all clear on what you have done.
rc_girl

Ok, I have set the portal settings. Have put in just test fields for a few answers. After that, I don't know what to do to add it to the index page. The quiz has been added to the template, because it says old_cms_quiz or something like that, but it is not showing up on the main index. I added it to the index template - the html code from the portal -  and I see that it has done something but I can't figure out what to do to get the quiz to be added as a portal.
myff admin

You still are not telling me much.

Try telling me what template files you have edited, and showing me the code in [code][/code] tags.
rc_girl

I am using myfutemplate1 based off of ca_aphropdite_lblue.

I have edited the portal :

Name - Quiz
Quiz Id - Quiz1
Published - yes
title - yes
count - 10
answer page - /index.php?component=QUIZ

save score - yes

test questions just saying test

added point scores, allowed retries and score save.

then went into edit template / logos.
Code:

[/b]
[/i]
<!-- IF QUIZ_MESSAGE <>"" -->
<h1>{QUIZ_MESSAGE}</h1>
<!-- ENDIF -->
<form action="{QUIZ_S_ACTION}" method="post">
<input type="hidden" name="mode" value="questions"></input>
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center">
<!--BEGIN switch_quiz_title -->
   <tr>
        <th colspan="1" width="100%" height="25" class="thTop" nowrap="nowrap"> {QUIZ_TITLE}</th>
     </tr>
<!--END switch_quiz_title -->     



<!-- IF QUIZ_S_QUESTIONS == 1 -->
<!-- IF (QUIZ_ALLOWRETRIES == 2 && QUIZ_PLAYED == 1) -->
<tr>
        <td>
You may play this quiz again, but your old score of {QUIZ_OLDSCORE} out of {QUIZ_MAXSCORE} will not be replaced.
</td>
</tr>
<!-- ENDIF -->
<!-- IF QUIZ_PASSED !="" -->
<tr>
        <td>You passed on the following questions which must be answered {QUIZ_PASSED}</td>
 </tr>
<tr>

<!-- ENDIF -->

<tr>
        <td> {QUIZ_INTRODUCTION}</td>
 </tr>
<tr>
<td>
<!-- IF (QUIZ_ALLOWRETRIES == 0 && QUIZ_PLAYED == 1) -->
You can only play this quiz once. You scored {QUIZ_OLDSCORE}.out of {QUIZ_MAXSCORE}
<!-- ELSE -->

<!-- BEGIN quiz -->
<!-- IF quiz.QUESTION_PASSED != "" -->
<b>You must answer this question.</b><br/>
<!-- ENDIF -->
Question {quiz.QUESTION_NUMBER}: {quiz.QUESTION}
<br/><br/>
<!-- IF quiz.QUESTION_MULTIPLE != 0  -->
Select all answers that apply&nbsp;
<!-- ELSE -->
Select answer&nbsp;
<!-- ENDIF -->
{quiz.ANSWER}
<br/><br/>
<hr />
  <!-- END quiz -->
<tr>
        <td> <input type="submit" value="Submit Answers"></input></td>
 </tr>
<!-- ENDIF -->
 
</td>
</tr>
<!-- ENDIF -->
<!-- IF QUIZ_S_ANSWERS == 1 -->
<tr>
<td>
Your score was {QUIZ_SCORE} out of {QUIZ_MAXSCORE}.
</td>
</tr>
<tr>
<td >
<table >
  <!-- BEGIN quiz -->
<tr><td>
<table cellpadding="10" style="border-width:1px;border-color:#000000;border-style:solid;">
<tr><td width="400">
<div class="gen">
Question {quiz.QUESTION_NUMBER}: {quiz.QUESTION}
<br/><br/>
You answered {quiz.ANSWER}
<br/><br/>
<!-- IF quiz.QUESTION_RIGHTANSWERS != "" -->
You got {quiz.QUESTION_RIGHT} right and {quiz.QUESTION_WRONG} wrong.
The right answers were {quiz.QUESTION_RIGHTANSWERS}.

<!-- ELSE -->
<!-- IF quiz.QUESTION_RIGHT == 1 -->
Right - the right answer was {quiz.QUESTION_RIGHTANSWER}
<!-- ELSE -->
Wrong - the right answer was {quiz.QUESTION_RIGHTANSWER}
<!-- ENDIF -->
<!-- ENDIF -->
</div>
</td>
<!-- IF quiz.QUESTION_ANSWERBYLINE != "" -->
<td width="200">
<div class="genmed">
<i>{quiz.QUESTION_ANSWERBYLINE}</i>
</div>
</td>
<!-- ELSE -->
<td width="200"></td>
<!-- ENDIF -->
</tr>
</table>
</tr></td>

 <!-- END quiz -->
</table>
</td>
</tr>
<!-- ENDIF -->
<!-- IF QUIZ_S_HIGHSCORES == 1 -->
<tr>
<td>
<h1>High scores</h1>
</td>
</tr>
<tr>
<td>
<table><tr><th>Member</th><th>Score out of {QUIZ_MAXSCORE}</th></tr>
  <!-- BEGIN quiz_scores -->
<td>{quiz_scores.USERNAME}</td><td>{quiz_scores.SCORE}</td></tr>
  <!-- END quiz_scores -->
</table>
</td>
</tr>
<!-- ENDIF -->
<!-- IF QUIZ_S_QUESTIONS ==0 && QUIZ_ALLOWRETRIES !=0 -->
<tr>
<td>
<a href="{QUIZ_PLAYURL}">Play again?</a>
</td>
</tr>
<!-- ENDIF -->



</table>

</form>

[i][b]Copied this into index.tpl at the bottom.

I have done that so far, and the portal did not show up.
I know I am doing something wrong, but don't know what. I am thinking it has to do with the second part.
rc_girl

I think I know what I did wrong. I will try that and if I can't figure it out, I will ask again. Thanks for trying to help.

rc_girl

I fixed it. Thanks, the how to do it forum and here has really helped, thanks a lot.
myff admin

As far as I can see you have simply not included the {MYFF.QUIZ} portal in index_body.tpl, but simply copied stuff from the cms_quiz.tpl file into index_body.tpl.

Without {MYFF.QUIZ} being included (which will drag in the template code) the portal will not be there.

ps) I asked you to use code tags, and you messed up the thread by not doing so
rc_girl

Sorry. I am still learning. I will try to get it right next time.

Thanks. I figured that one out.

Sorry.


tink

       myfreeforum.org Forum Index -> Portal components
Page 1 of 1
Create your own free forum | Buy a domain to use with your forum