Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
906 views
in Q2A Core by
edited by
For some reason there is an issue with the & character, the code works now, but it does not longer validate. Would be very helpful if someone who knows php could look in it.

Thnak You so much

monk333

CODE:

if (isset($this->content['populartags'])) {
    $newarray=( array_slice( $this->content['populartags'], 0, 12 ) );
    $this->output('<DIV CLASS="qa-sidebar-poptags-bbb">');
    $this->content['populartags'];
    $this->output('<h2 CLASS="qa-sidebar-poptags-h2-bbb">');
    echo "Popular Tags";
    $this->output('</h2>', '');
    $this->output('<p CLASS="qa-sidebar-poptags-p-bbb">');

    foreach($newarray AS $name => $value)
        {
        $this->output('<a class="qa-sidebar-poptags-link-bbb" href="/tag/'.$name.'"><span class="nobreak">');
        $this->output(''.$name.'');
        $this->output('</span></a>');
        }
      $this->output('</p>', '');
      echo "<p class=\"qa-sidebar-poptags-p-bbb\"><a class=\"qa-sidebar-poptags-link-all-bbb\" href=\"/tags/\"><span class=\"nobreak\">All Topics</span></a></p>";
    $this->output('</DIV>', '');
        }
related to an answer for: How can I add tag to sidebar? (for V1.2)
by
edited by
Ok Ok, gidgreen said use qa_tag_html() but I did not know how to.  And Yes I have a learning curve like a stone ;). Now I figured it out and with the changed code for the foreach function it seems to work. Now I have only to find out how to change the class. Here the code:

foreach($newarray AS $name => $value)
        {
    $this->output(''.qa_tag_html($name).'');
    }

update: the function qa_tag_html() is in qa-app-format.php in the include folder. To change thes class for the tags in the side bar I added the same function again, renamed it to qa_tag_html_bbb() and inside the function I changed the class to the one i build for the tags in sidebar.

Hope I did that correctly.

monk333

Please log in or register to answer this question.

...