Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Moving the Start Discussion Button?

edited February 2007 in Vanilla 1.0 Help
Is it possible to move the start discussion button from panel.php to discussion.php?

This is what I have right now:
echo '<div id="threadnav"> '.$this->PageJump.'<div class="pagenav"> '.($PageDetails == '' ? $this->Context->GetDefinition('NoDiscussionsFound') : $PageDetails).'</p> '.$PageList.' </div>'; if ($this->Context->Session->UserID > 0 && $this->Context->Session->User->Permission('PERMISSION_START_DISCUSSION')) { $CategoryID = ForceIncomingInt('CategoryID', 0); if ($CategoryID == 0) $CategoryID = ''; echo '<div class="newthread tenpx"><a href="'.GetUrl($this->Context->Configuration, 'post.php', 'category/', 'CategoryID', $CategoryID).'">New Thread</a></div>' } $this->CallDelegate('PostStartButtonRender')'; <hr class="clear" /> </div> <div id="threads">';

I keep getting this error: Parse error: parse error, unexpected '}', expecting ',' or ';' in C:\wamp\www\hl\themes\discussions.php on line 13. Any idea's on how to fix this?

Comments

  • The 3 lines befor the threads div above don't look right. Maybe you copied the lines into the wrong place.
  • I had moved the Start New Discussion button from panel.php to discussion.php. The <hr>, the div end are all mine from modifying the templates.
  • Solved:

    echo '<div id="threadnav">'; echo '<div class="pagenav"> <p>'.($PageDetails == '' ? $this->Context->GetDefinition('NoDiscussionsFound') : $PageDetails).'</p> '.$PageList.' </div>'; if ($this->Context->Session->UserID > 0 && $this->Context->Session->User->Permission('PERMISSION_START_DISCUSSION')) { $CategoryID = ForceIncomingInt('CategoryID', 0); if ($CategoryID == 0) $CategoryID = ''; echo '<div class="newthread tenpx"><a href="'.GetUrl($this->Context->Configuration, 'post.php', 'category/', 'CategoryID', $CategoryID).'">New Thread</a></div>'; } $this->CallDelegate('PostStartButtonRender'); echo '<hr class="clear" /> </div>
This discussion has been closed.