SVN commit 1231431 by aacid: allow to set the anchor name when creating the question, this is a "hack" for i18n'able websites so the anchor does not change between languages acked by Ingo M +11 -2 class_faq.inc --- trunk/www/media/includes/classes/class_faq.inc #1231430:1231431 @@ -70,22 +70,31 @@ { var $question; var $answer; + var $anchor; function Question($question, $answer) { $this->question = $question; $this->answer = $answer; + $this->anchor = ereg_replace("[^a-zA-Z]", "", $this->question); } + function Question($question, $answer, $anchor) + { + $this->question = $question; + $this->answer = $answer; + $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"; }