<?php /** * mintypublish Content Management System * Copyright (c) 2009-2010 a2h * http://github.com/a2h/mintypublish * * This program 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 3 of the * License, or (at your option) any later version. * * This program 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. * * Under section 7b of the GNU General Public License you are * required to preserve this notice. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ if ($zvfpcms) { echo '<h1>' . $_GET['path'] . '</h1>'; if (filetypes('embeddable', $_GET['path'])) { echo media_html($_GET['path']); } else { echo '<a href="' . $location['files'] . '/' . $_GET['path'] . '">Download this file</a>'; } }
function parsebbcode($buffer) { if (strchr($buffer, '<!-- noreplace -->') == false) { $find = array('/(\\[mediainline\\])(.+)(\\[\\/mediainline\\])/'); $replace = array(media_html('\\2')); $string = preg_replace($find, $replace, $buffer); return $string; } else { return $buffer; } }