Revision 1294
Added by Dietmar over 14 years ago
filter-routines.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
/** |
|
3 |
* |
|
4 |
* @category modules |
|
5 |
* @package output_filter |
|
6 |
* @author WebsiteBaker Project |
|
7 |
* @copyright 2004-2009, Ryan Djurovich |
|
8 |
* @copyright 2009-2010, Website Baker Org. e.V. |
|
9 |
* @link http://www.websitebaker2.org/ |
|
10 |
* @license http://www.gnu.org/licenses/gpl.html |
|
11 |
* @platform WebsiteBaker 2.8.x |
|
12 |
* @requirements PHP 4.4.9 and higher |
|
13 |
* @version $Id$ |
|
14 |
* @filesource $HeadURL$ |
|
15 |
* @lastmodified $Date$ |
|
16 |
* |
|
17 |
*/ |
|
2 | 18 |
|
3 |
// $Id$ |
|
4 |
|
|
5 |
/* |
|
6 |
|
|
7 |
Website Baker Project <http://www.websitebaker.org/> |
|
8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
9 |
|
|
10 |
Website Baker is free software; you can redistribute it and/or modify |
|
11 |
it under the terms of the GNU General Public License as published by |
|
12 |
the Free Software Foundation; either version 2 of the License, or |
|
13 |
(at your option) any later version. |
|
14 |
|
|
15 |
Website Baker is distributed in the hope that it will be useful, |
|
16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
GNU General Public License for more details. |
|
19 |
|
|
20 |
You should have received a copy of the GNU General Public License |
|
21 |
along with Website Baker; if not, write to the Free Software |
|
22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
23 |
* @category frontend |
|
24 |
* @package outputfilter |
|
25 |
* @author(s) Dietmar W?llbrink <Luisehahne>, Dietrich Roland Pehlke <Aldus> |
|
26 |
* @platform WB 2.8.0 |
|
27 |
* @require PHP 5.2.x |
|
28 |
* @license http://www.gnu.org/licenses/gpl.html |
|
29 |
* @link http://project.websitebaker2.org/browser/branches/2.8.x/wb/modules/output_filter/filter-routines.php |
|
30 |
* @changeset 2009/12/03 change searchstring mdcr.js, workout crypt emails |
|
31 |
|
|
32 |
*/ |
|
33 |
|
|
34 | 19 |
// prevent this file from being accessed directly |
35 | 20 |
if(!defined('WB_PATH')) die(header('Location: ../index.php')); |
36 | 21 |
|
... | ... | |
83 | 68 |
// check if mailto mail addresses needs to be filtered |
84 | 69 |
if($filter_settings['mailto_filter'] == '1') { |
85 | 70 |
$output_filter_mode = $output_filter_mode + 2; // 0|2 |
86 |
|
|
71 |
|
|
87 | 72 |
// check if Javascript mailto encryption is enabled (call register_frontend_functions in the template) |
73 |
$search_pattern = '/<.*src=\".*\/mdcr.js.*>/iU'; |
|
74 |
if(preg_match($search_pattern, $content)) |
|
75 |
{ |
|
76 |
$output_filter_mode = $output_filter_mode + 4; // 0|4 |
|
77 |
} |
|
78 |
/* |
|
88 | 79 |
$search = '<script src="' .WB_URL .'/modules/output_filter/js/mdcr.js" type="text/javascript"></script>'; |
89 | 80 |
$search_droplet = '<script src="' .WB_URL .'/modules/droplets/js/mdcr.js" type="text/javascript"></script>'; |
90 |
if(strpos($content, $search) !== false || strpos($content, $search_droplet) !== false) {
|
|
81 |
if(strpos($content, $search) !== false || strpos($content, $search_droplet) !== false) { |
|
91 | 82 |
$output_filter_mode = $output_filter_mode + 4; // 0|4 |
92 | 83 |
} |
84 |
*/ |
|
93 | 85 |
} |
94 | 86 |
|
95 | 87 |
// define some constants so we do not call the database in the callback function again |
96 | 88 |
Also available in: Unified diff
update headerinfo
change $search_pattern for check if Javascript mailto encryption is enabled
module output_filter set to version 0.12