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.
Vanilla 0.9.3+ versions of WhosOnline & PHPBBCode
Hi,
I tried to debug WhosOnline & PHPBBCode to make them available on Vanilla 0.9.3+. I don't know if anyone was on this project or did this already, but here they are :
WhosOnline version 1.1
PHPBBCode version 1.2
I tried to debug WhosOnline & PHPBBCode to make them available on Vanilla 0.9.3+. I don't know if anyone was on this project or did this already, but here they are :
WhosOnline version 1.1
PHPBBCode version 1.2
0
This discussion has been closed.
Comments
Now corrected, same address !
I checked it, and it's the right one. It's effectively based on the BBCode script, and modified with part of Garth Henson PHPMod for 0.9.2.
<?php /* Extension Name: BB Code (PHP Mod) Extension Url: http://lussumo.com/docs/ Description: A BBCode-to-HTML conversion tool for discussion comments Version: 1.2 Author: Mark O'Sullivan and Garth Henson, Vanilla 0.9.3+ version by Julien Cassignol. Author Url: http://markosullivan.ca/ */ /* * Copyright 2003 - 2005 Mark O'Sullivan * This file is part of Vanilla. * Vanilla is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. * Vanilla is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with Vanilla; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * The latest source code for Vanilla is available at www.lussumo.com * Contact Mark O'Sullivan at mark [at] lussumo [dot] com */ /* Snip : Too long... */ $Replacements = array( '\'<img src="\'.$this->Url(\'$1\').\'" />\'', '\'<a href="\'.$this->Url(\'$1\').\'" target="_blank">$2</a>\'', '\'<a href="\'.$this->Url(\'$1\').\'">$1</a>\'', '<strong>$1</strong>', '<em>$1</em>', '<u>$1</u>' ); return $this->PHPCode(preg_replace($Patterns, $Replacements, $String)); } function PHPCode($String) { preg_match_all("|\[php\].+?\[/php\]|ims", $String, $matches); $phpOld = array(); $phpNew = array(); foreach ($matches[0] as $orig) { $phpOld[] = $orig; $new = str_replace(array('<','>','<br />','<br>'), array('<','>',"\n","\n"), $orig); $new = trim(preg_replace("|\[php\](.+?)\[/php\]|ims", "$1", $new)); $phpNew[] = "<div class='snippetTitle'>PHP Code:</div>\n<div class='codeSnippet'>" . highlight_string($new, true) . "</div>\n"; } $String = str_replace($phpOld, $phpNew, $String); preg_match_all("|\[code\].+?\[/code\]|ims", $String, $matches); $codeOld = array(); $codeNew = array(); foreach ($matches[0] as $orig) { $codeOld[] = $orig; $new = str_replace(array('<br />','<br>'), array("\n","\n"), $orig); $new = trim(preg_replace('|\[code\](.+?)\[/code\]|ims', "$1", $new)); $new = str_replace("\n", '<br />', $new); $codeNew[] = "<div class='snippetTitle'>Code:</div>\n<div class='codeSnippet'><code>$new< /code></div>\n"; } $String = str_replace($codeOld, $codeNew, $String); return $String; } } // Instantiate the bbcode object and add it to the string manipulation methods $BBCodeFormatter = $Context->ObjectFactory->NewObject($Context, "BBCodeFormatter"); $Context->StringManipulator->AddManipulator("BBCode", $BBCodeFormatter); ?>
I had to add an extra space on </code> by the way :-)
It also looks like the html formatter dosn't seem to be properly replacing ampersands all of a sudden...