Project

General

Profile

« Previous | Next » 

Revision 1701

Added by Dietmar about 12 years ago

! /framework/frontend.functions
! change multi-dimensional arrays (variables) to similar arrays
! method page_content, add parameter $echo true to print $content, false return $content

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16

  
16
27 Aug-2012 Build 1701 Dietmar Woellbrink (Luisehahne)
17
! /framework/frontend.functions
18
! change multi-dimensional arrays (variables) to similar arrays
19
! method page_content, add parameter $echo true to print $content, false return $content
17 20
27 Aug-2012 Build 1700 Dietmar Woellbrink (Luisehahne)
18 21
! change multi-dimensional arrays (variables) to similar arrays
19 22
+ add variables for backend-menu, header.htt and footer.htt 
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', '1700');
54
if(!defined('REVISION')) define('REVISION', '1701');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/framework/frontend.functions.php
3 3
 *
4 4
 * @category        framework
5 5
 * @package         frontend.functions
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
9 8
 * @link			http://www.websitebaker2.org/
10 9
 * @license         http://www.gnu.org/licenses/gpl.html
11 10
 * @platform        WebsiteBaker 2.8.x
......
79 78
	 * get relative link from database based on pages_dir
80 79
	 * @global <type> $database
81 80
	 * @param <type> $id
82
	 * @return <type> 
81
	 * @return <type>
83 82
	 */
84 83
	function get_page_link( $id )
85 84
    {
......
238 237
	 * @global wb $wb
239 238
	 * @global string $global_name
240 239
	 * @param int $block
240
	 * @param boolean true to print $content, false return $content
241 241
	 * @return void
242 242
	 */
243
	function page_content($block = 1) {
243
	function page_content($block = 1, $echo=true) {
244 244
		// Get outside objects
245 245
		global $TEXT,$MENU,$HEADING,$MESSAGE;
246 246
		global $globals;
......
248 248
		global $wb;
249 249
		$admin = $wb;
250 250
		if ($wb->page_access_denied==true) {
251
	        echo $MESSAGE['FRONTEND']['SORRY_NO_VIEWING_PERMISSIONS'];
251
	        echo $MESSAGE['FRONTEND_SORRY_NO_VIEWING_PERMISSIONS'];
252 252
			return;
253 253
		}
254 254
		if ($wb->page_no_active_sections==true) {
255
	        echo $MESSAGE['FRONTEND']['SORRY_NO_ACTIVE_SECTIONS'];
255
	        echo $MESSAGE['FRONTEND_SORRY_NO_ACTIVE_SECTIONS'];
256 256
			return;
257 257
		}
258 258
		if(isset($globals) AND is_array($globals)) {
......
288 288
					$page_id = $wb->default_block_content;
289 289
				} else {
290 290
					$page_id = $wb->default_page_id;
291
				}				
291
				}
292 292
				$sql  = 'SELECT `section_id`, `module`, `publ_start`, `publ_end` ';
293 293
				$sql .= 'FROM `'.TABLE_PREFIX.'sections` ';
294 294
				$sql .= 'WHERE `page_id`='.$page_id.' AND `block`='.$block.' ';
......
326 326
						$arr_string[0] = str_replace("_", " ", $arr_string[0]);
327 327
					}
328 328
					echo search_highlight($content, $arr_string);
329
				} elseif($echo==true) {
330
					echo $content;
329 331
				} else {
330
					echo $content;
332
				    return $content;
331 333
				}
332 334
			}
333
		}
334
        else {
335
		} else {
335 336
			require(PAGE_CONTENT);
336 337
		}
337 338
	}
......
640 641
        print $head_links;
641 642
    }
642 643
}
643

  
644
/*
644 645
	function moveCssToHead($content) {
645 646
		// move css definitions into head section
646 647
		$pattern1 = '/(?:<body.*?)(<link[^>]*?\"text\/css\".*?\/>)/si';
647
		$pattern2 = '/(?:<body.*?)(<style[^>]*?\"text\/css\"[^>]*?>.*?<\/style>)/si';
648
		$pattern2 = '/(?:<body.*?)(<style[^>]*?\"text\/css\"[^>]* ?>.*?<\/style>)/si';
648 649
		while(preg_match($pattern1, $content, $matches)==1) {
649 650
		// loop through all linked CSS
650 651
			$insert = $matches[1];
......
661 662
		}
662 663
		return $content;
663 664
	}
665
*/

Also available in: Unified diff