Project

General

Profile

« Previous | Next » 

Revision 2024

Added by darkviper almost 11 years ago

! some new or fixed Droplets added

View differences:

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

  
14
07 Dec-2013 Build 2024 Manuela v.d.Decken(DarkViper)
15
! some new or fixed Droplets added
14 16
07 Dec-2013 Build 2023 Manuela v.d.Decken(DarkViper)
15 17
# mod-MultiLingual misconfiguration of language switches solved
16 18
06 Dec-2013 Build 2022 Manuela v.d.Decken(DarkViper)
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', '2023');
54
if(!defined('REVISION')) define('REVISION', '2024');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/modules/droplets/example/iParentPageIcon.php
7 7
//
8 8

  
9 9
$oDb = WbDatabase::getInstance();
10
$oReg = WbAdaptor::getInstance();
10 11
$type = !isset($type) ? 0 : (intval($type) % 3);
11 12
$icontypes = array( 0=>'page_icon', 1=>'menu_icon_0', 2=>'menu_icon_1');
12 13
$icon_url = '';
13
if( isset($icon) && is_readable(WB_PATH.'/templates/'.TEMPLATE.'/'.$icon) )
14
if( isset($icon) && is_readable($oReg->AppPath.'templates/'.TEMPLATE.'/'.$icon) )
14 15
{
15
	$icon_url = WB_REL.'/templates/'.TEMPLATE.'/'.$icon;
16
	$icon_url = $oReg->AppUrl.'templates/'.TEMPLATE.'/'.$icon;
16 17
}
17 18
$tmp_trail = array_reverse($GLOBALS['wb']->page_trail);
18 19
foreach($tmp_trail as $pid)
......
22 23
	$sql .= 'WHERE `page_id`='.(int)$pid;
23 24
	if( ($icon = $oDb->get_one($sql)) != false )
24 25
	{
25
		if( file_exists(WB_PATH.$icon) )
26
		$icon = ltrim(str_replace('\\', '/', $icon), '/');
27
		if( file_exists($oReg->AppPath.$icon) )
26 28
		{
27
			$icon_url = WB_REL.$icon;
29
			$icon_url = $oReg->AppUrl.$icon;
28 30
			break;
29 31
		}
30 32
	}
branches/2.8.x/wb/modules/droplets/example/iParentBlock.php
1
//:search for blockcontent in current page and parent pages if not found
2
//:Use: [[iParentBlock?block=2]] Display the content of a defined block
3
// Select all WYSIWYG-sections from a defined block on this page or it's parent pages
4
// @author: Werner von der Decken
5
global $wb, $database;
6
	$oDb = WbDatabase::getInstance();
7
	$rt_content = '';
8
	$block = !isset($block) ? 1 : intval($block);
9
	$tmp_trail = $wb->page_trail;
10
	while( ($pid = array_pop($tmp_trail)) != null )
11
	{
12
		$sql  = 'SELECT `w`.`content`, `s`.`section_id`, `p`.`page_id`, `p`.`visibility`, ';
13
		$sql .=        '`p`.`viewing_groups`, `p`.`viewing_users` ';
14
		$sql .= 'FROM `'.$oDb->TablePrefix.'mod_wysiwyg` `w` ';
15
		$sql .=   'LEFT JOIN `'.$oDb->TablePrefix.'sections` `s` ON `w`.`section_id`= `s`.`section_id` ';
16
		$sql .=   'LEFT JOIN `'.$oDb->TablePrefix.'pages` `p` ON `s`.`page_id`=`p`.`page_id` ';
17
		$sql .= 'WHERE `s`.`block`='.$block.' AND `s`.`page_id`='.$pid.' ';
18
		$sql .= 'ORDER BY `s`.`position` ASC';
19
		if( $rs_pages = $oDb->doQuery($sql) )
20
		{
21
			while( $rec_page = $rs_pages->fetchRow(MYSQL_ASSOC) )
22
			{
23
				if( $wb->page_is_visible($rec_page) )
24
				{
25
					if( $wb->section_is_active($rec_page['section_id']) )
26
					{
27
						$rt_content .= trim($rec_page['content']);
28
					}
29
				}
30
			}
31
		}
32
		if($rt_content != '') { break; }
33
	}
34
return $rt_content;
branches/2.8.x/wb/modules/droplets/example/iMultiLingual.php
20 20
 * @return: a valid image-URL or empty string
21 21
 */
22 22

  
23
$ext = !isset($ext) ? 'auto' : strtolower($ext);
23
$sExt = !isset($ext) ? 'auto' : strtolower($ext);
24 24
$sRetval = '';
25 25
if(function_exists('language_menu')){
26
	switch($ext)
26
	switch($sExt)
27 27
	{
28 28
		case 'png':
29 29
		case 'svg':

Also available in: Unified diff