Revision 1543
Added by Dietmar over 12 years ago
SectionPicker.php | ||
---|---|---|
1 | 1 |
//:Load the view.php from any other section-module |
2 | 2 |
//:Use [[SectionPicker?sid=123]] |
3 |
global $database, $wb, $TEXT, $DGTEXT; |
|
3 |
global $database, $wb, $TEXT, $DGTEXT, $output;
|
|
4 | 4 |
$content = ''; |
5 | 5 |
if( intval($sid)>0 ) { |
6 | 6 |
$sql = 'SELECT `page_id`, `section_id`, `module` FROM `'.TABLE_PREFIX.'sections` '; |
... | ... | |
14 | 14 |
$_sFrontendCss = '/modules/'.$module.'/frontend.css'; |
15 | 15 |
if(is_readable(WB_PATH.$_sFrontendCss)) { |
16 | 16 |
$_sSearch = preg_quote(WB_URL.'/modules/'.$module.'/frontend.css', '/'); |
17 |
if(preg_match('/<link[^>]*?href\s*=\s*\"'.$_sSearch.'\".*?\/>/si', $wb_page_data)) {
|
|
17 |
if(preg_match('/<link[^>]*?href\s*=\s*\"'.$_sSearch.'\".*?\/>/si', $output)) {
|
|
18 | 18 |
$_sFrontendCss = ''; |
19 | 19 |
}else { |
20 | 20 |
$_sFrontendCss = '<link href="'.WB_URL.$_sFrontendCss.'" rel="stylesheet" type="text/css" media="screen" />'; |
21 | 21 |
} |
22 |
} |
|
22 |
} else { $_sFrontendCss = ''; }
|
|
23 | 23 |
ob_start(); |
24 | 24 |
require(WB_PATH.'/modules/'.$module.'/view.php'); |
25 | 25 |
$content = $_sFrontendCss.ob_get_clean(); |
26 | 26 |
} |
27 | 27 |
} |
28 |
return $content; |
|
28 |
return $content; |
Also available in: Unified diff
fix droplet sectionPicker
fix install config.php not writeable
check table droplet if empty import examples