SVN commit 1231439 by aacid: and now allow to specify the $anchor in a way i don't break all kde websites M +10 -5 class_faq.inc --- trunk/www/media/includes/classes/class_faq.inc #1231438:1231439 @@ -16,9 +16,9 @@ { } - function addQuestion($question_text, $answer_text) + function addQuestion($question_text, $answer_text, $anchor = "") { - $question = new Question($question_text, $answer_text); + $question = new Question($question_text, $answer_text, $anchor); array_push($this->items, $question); } @@ -70,22 +70,27 @@ { var $question; var $answer; + var $anchor; - function Question($question, $answer) + function Question($question, $answer, $anchor = "") { $this->question = $question; $this->answer = $answer; + if ($anchor == "") + $this->anchor = ereg_replace("[^a-zA-Z]", "", $this->question); + else + $this->anchor = $anchor; } function showQuestion() { - print "
  • question) . "\">$this->question
  • \n"; + print "
  • anchor\">$this->question
  • \n"; } function showAnswer() { global $site_locale; - print "

    question) . "\">$this->question

    \n"; + print "

    anchor\">$this->question

    \n"; print "

    $this->answer

    \n"; print "

    ". i18n_var("[Up to Questions]") . "

    \n"; }