Project

General

Profile

« Previous | Next » 

Revision 1905

Added by darkviper over 11 years ago

added new OutputFilter plugin 'FilterMediaRel'

View differences:

branches/2.8.x/CHANGELOG
11 11
! = Update/Change
12 12
===============================================================================
13 13

  
14
01 Jun-2013 Build 1905 Werner v.d.Decken(DarkViper)
15
+ new OutputFilter plugin 'FilterMediaRel'
14 16
01 Jun-2013 Build 1904 Werner v.d.Decken(DarkViper)
15 17
+ new method wb::ReplaceAbsoluteMediaUrl()
16 18
+ class wb: Translate::disableAddon() in print_error() and print_success()
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1904');
54
if(!defined('REVISION')) define('REVISION', '1905');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/modules/output_filter/filters/filterMediaRel.php
1
<?php
2
/**
3
 * doFilterMediaRel
4
 * @param string to modify
5
 * @return string
6
 * Convert the Placeholder {SYSVAR:MEDIA_REL} into the real, full qualified URL
7
 */
8
	function doFilterMediaRel($sContent) {
9
		return str_replace('{SYSVAR:MEDIA_REL}', WB_URL.MEDIA_DIRECTORY, $sContent);
10
	}
0 11

  
branches/2.8.x/wb/modules/output_filter/index.php
36 36
		define('OUTPUT_FILTER_AT_REPLACEMENT', $filter_settings['at_replacement']);
37 37
		define('OUTPUT_FILTER_DOT_REPLACEMENT', $filter_settings['dot_replacement']);
38 38

  
39
/* ### filter type: replace MediaRel placeholder ############################ */
40
		if (file_exists($sFilterDirectory.'filterMediaRel.php')) {
41
			require_once($sFilterDirectory.'filterMediaRel.php');
42
			$content = doFilterMediaRel($content);
43
		}
44
/* ### filter type: change [wblinkxx] into real URLs ######################## */
45
		if (file_exists($sFilterDirectory.'filterWbLink.php')) {
46
			require_once($sFilterDirectory.'filterWbLink.php');
47
			$content = doFilterWbLink($content);
48
		}
39 49
/* ### filter type: execute droplets filter ################################# */
40 50
		if (file_exists($sFilterDirectory.'filterDroplets.php')) {
41
			require($sFilterDirectory.'filterDroplets.php');
51
			require_once($sFilterDirectory.'filterDroplets.php');
42 52
			$content = doFilterDroplets($content);
43 53
		}
44 54
/* ### filter type: protect email addresses ################################# */
45 55
		if( ($output_filter_mode & pow(2, 0)) || ($output_filter_mode & pow(2, 1)) ) {
46 56
			if (file_exists($sFilterDirectory.'filterEmail.php')) {
47
				require($sFilterDirectory.'filterEmail.php');
57
				require_once($sFilterDirectory.'filterEmail.php');
48 58
				$content = doFilterEmail($content, $output_filter_mode);
49 59
			}
50 60
		}
61
/* ### filter type: replace MediaRel placeholder ############################ */
62
		if (file_exists($sFilterDirectory.'filterMediaRel.php')) {
63
			require_once($sFilterDirectory.'filterMediaRel.php');
64
			$content = doFilterMediaRel($content);
65
		}
51 66
/* ### filter type: change [wblinkxx] into real URLs ######################## */
52 67
		if (file_exists($sFilterDirectory.'filterWbLink.php')) {
53
			require($sFilterDirectory.'filterWbLink.php');
68
			require_once($sFilterDirectory.'filterWbLink.php');
54 69
			$content = doFilterWbLink($content);
55 70
		}
56 71
/* ### filter type: full qualified URLs to relative URLs##################### */
57 72
        if($filter_settings['sys_rel'] == 1){
58 73
			if (file_exists($sFilterDirectory.'filterRelUrl.php')) {
59
				require($sFilterDirectory.'filterRelUrl.php');
74
				require_once($sFilterDirectory.'filterRelUrl.php');
60 75
				$content = doFilterRelUrl($content);
61 76
			}
62 77
		}
63 78
/* ### filter type: moves css definitions from <body> into <head> ########### */
64 79
		if (file_exists($sFilterDirectory.'filterCssToHead.php')) {
65
			require($sFilterDirectory.'filterCssToHead.php');
80
			require_once($sFilterDirectory.'filterCssToHead.php');
66 81
			$content = doFilterCssToHead($content);
67 82
		}
68 83

  

Also available in: Unified diff