Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 1716)
+++ branches/2.8.x/CHANGELOG	(revision 1717)
@@ -13,6 +13,13 @@
 
 
 
+29 Aug-2012 Build 1717 Dietmar Woellbrink (Luisehahne)
+! update droplets uninstall, upgrade
+! add $database=WbDatabase::getInstance();
+! update /examples/
+29 Aug-2012 Build 1716 Dietmar Woellbrink (Luisehahne)
+! update folder admin/settings admin/skel/htt
+! change Template to div container
 29 Aug-2012 Build 1715 Dietmar Woellbrink (Luisehahne)
 ! forgot some files in folder admin
 29 Aug-2012 Build 1714 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 1716)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 1717)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '1716');
+if(!defined('REVISION')) define('REVISION', '1717');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/modules/droplets/example/SectionPicker.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/SectionPicker.php	(revision 1716)
+++ branches/2.8.x/wb/modules/droplets/example/SectionPicker.php	(revision 1717)
@@ -1,9 +1,10 @@
-//:Load the view.php from any other section-module
+//:Load the view.php from any other section-module, including the frontend.css
 //:Use [[SectionPicker?sid=123]]
-global $database, $wb, $TEXT, $DGTEXT;
+global $database, $wb, $TEXT, $DGTEXT,$section_id,$page_id;
 $content = '';
 $sid = isset($sid) ? intval($sid) : 0;
 if( $sid ) {
+	$oldSid = $section_id; // save old sectionID
 	$sql  = 'SELECT `module` FROM `'.TABLE_PREFIX.'sections` ';
 	$sql .= 'WHERE `section_id`='.$sid;
 	if (($module = $database->get_one($sql))) {
@@ -18,7 +19,6 @@
 				}
 			} else { $_sFrontendCss = ''; }
 			ob_start();
-			$oldSid = $section_id; // save old sectionID
 			$section_id = $sid;
 			require(WB_PATH.'/modules/'.$module.'/view.php');
 			$content = $_sFrontendCss.ob_get_clean();
Index: branches/2.8.x/wb/modules/droplets/example/iParentPageIcon.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/iParentPageIcon.php	(revision 1716)
+++ branches/2.8.x/wb/modules/droplets/example/iParentPageIcon.php	(revision 1717)
@@ -9,9 +9,9 @@
 $type = !isset($type) ? 0 : (intval($type) % 3);
 $icontypes = array( 0=>'page_icon', 1=>'menu_icon_0', 2=>'menu_icon_1');
 $icon_url = '';
-if( isset($icon) && file_exists(WB_PATH.'/'.TEMPLATE.'/'.$icon) )
+if( isset($icon) && is_readable(WB_PATH.'/templates/'.TEMPLATE.'/'.$icon) )
 {
-	$icon_url = WB_REL.'/'.TEMPLATE.'/'.$icon;
+	$icon_url = WB_REL.'/templates/'.TEMPLATE.'/'.$icon;
 }
 $tmp_trail = $wb->page_trail;
 $tmp_trail = array_reverse($tmp_trail);
Index: branches/2.8.x/wb/modules/droplets/example/EditThisPage.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/EditThisPage.php	(nonexistent)
+++ branches/2.8.x/wb/modules/droplets/example/EditThisPage.php	(revision 1717)
@@ -0,0 +1,20 @@
+//:Puts a EditThisPage link on your page, if you have the rights
+//:Use [[EditThisPage]]
+
+global $page_id, $HEADING;
+$retVal = '';
+$wb = new admin ('Start', 'start', false, false);
+if (FRONTEND_LOGIN == true && is_numeric($wb->get_session('USER_ID')))
+{
+
+	if( $wb->get_permission('pages_modify') && $wb->get_page_permission( PAGE_ID ) )
+	{
+		$retVal .= '<div class="page-modify">'."\n";
+		$retVal .= '<a target="_blank" href="'.ADMIN_URL.'/pages/modify.php?page_id='.PAGE_ID.'" title="'.$HEADING['MODIFY_PAGE'].'" class="blank_target">';
+		$retVal .= '<img src="'.ADMIN_URL . '/images/modify_16.png" alt="'.$HEADING['MODIFY_PAGE'].'" />';
+		$retVal .= '<span>'.$HEADING['MODIFY_PAGE'].'</span>';
+		$retVal .= '</a>';
+		$retVal .= '</div>'."\n";
+	}
+}
+return $retVal;
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/droplets/example/EditThisPage.php
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/droplets/example/LoginBox.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/example/LoginBox.php	(revision 1716)
+++ branches/2.8.x/wb/modules/droplets/example/LoginBox.php	(revision 1717)
@@ -3,70 +3,11 @@
 //:Absolute or relative url possible
 //:Remember to enable frontend login in your website settings.
 
-	global $wb,$page_id,$TEXT, $MENU, $HEADING;
+	global $page_id,$TEXT, $MENU, $HEADING;
 
 	$return_value = '<div class="login-box">'."\n";
 	$return_admin = ' ';
-	// Return a system permission
-	function get_permission($name, $type = 'system')
-	{
-	   	global $wb;
-	// Append to permission type
-		$type .= '_permissions';
-		// Check if we have a section to check for
-		if($name == 'start') {
-			return true;
-		} else {
-			// Set system permissions var
-			$system_permissions = $wb->get_session('SYSTEM_PERMISSIONS');
-			// Set module permissions var
-			$module_permissions = $wb->get_session('MODULE_PERMISSIONS');
-			// Set template permissions var
-			$template_permissions = $wb->get_session('TEMPLATE_PERMISSIONS');
-			// Return true if system perm = 1
-			if (isset($$type) && is_array($$type) && is_numeric(array_search($name, $$type))) {
-				if($type == 'system_permissions') {
-					return true;
-				} else {
-					return false;
-				}
-			} else {
-				if($type == 'system_permissions') {
-					return false;
-				} else {
-					return true;
-				}
-			}
-		}
-	}
-
-	function get_page_permission($page, $action='admin') {
-		if ($action!='viewing'){ $action='admin';}
-		$action_groups=$action.'_groups';
-		$action_users=$action.'_users';
-		if (is_array($page)) {
-				$groups=$page[$action_groups];
-				$users=$page[$action_users];
-		} else {
-			global $database,$wb;
-			$results = $database->query("SELECT $action_groups,$action_users FROM ".TABLE_PREFIX."pages WHERE page_id = '$page'");
-			$result = $results->fetchRow();
-			$groups = explode(',', str_replace('_', '', $result[$action_groups]));
-			$users = explode(',', str_replace('_', '', $result[$action_users]));
-		}
-
-		$in_group = FALSE;
-		foreach($wb->get_groups_id() as $cur_gid){
-		    if (in_array($cur_gid, $groups)) {
-		        $in_group = TRUE;
-		    }
-		}
-		if((!$in_group) AND !is_numeric(array_search($wb->get_user_id(), $users))) {
-			return false;
-		}
-		return true;
-	}
-
+	$wb = new admin ('Start', 'start', false, false);
 // Get redirect
 	$redirect_url = ((isset($_SESSION['HTTP_REFERER']) && $_SESSION['HTTP_REFERER'] != '') ? $_SESSION['HTTP_REFERER'] : WB_URL );
    	$redirect_url = (isset($redirect) && ($redirect!='') ? $redirect : $redirect_url);
@@ -76,7 +17,8 @@
 		        ( $wb->get_session('USER_ID') == '')  )
 	{
 		$return_value .= '<form action="'.LOGIN_URL.'" method="post">'."\n";
-		$return_value .= '<input type="hidden" name="url" value="'.$redirect_url.'" />'."\n";
+		$return_value .= '<input type="hidden" name="redirect" value="'.$redirect_url.'" />'."\n";
+
     	$return_value .= '<fieldset>'."\n";
 		$return_value .= '<h1>'.$TEXT['LOGIN'].'</h1>'."\n";
 		$return_value .= '<label for="username">'.$TEXT['USERNAME'].':</label>'."\n";
@@ -95,31 +37,36 @@
 	    $return_value .= '</fieldset>'."\n";
 		$return_value .= '</form>'."\n";
 
-	} elseif( (FRONTEND_LOGIN == 'enabled') &&
+	} elseif( (FRONTEND_LOGIN == true) &&
 				(is_numeric($wb->get_session('USER_ID'))) )
 	{
-			$return_value .= '<form action="'.LOGOUT_URL.'" method="post" class="login-table">'."\n";
-        	$return_value .= '<fieldset>'."\n";
-			$return_value .= '<h1>'.$TEXT["LOGGED_IN"].'</h1>'."\n";
-			$return_value .= '<label>'.$TEXT['WELCOME_BACK'].', '.$wb->get_display_name().'</label>'."\n";
-			$return_value .= '<p><input type="submit" name="submit" value="'.$MENU['LOGOUT'].'" class="dbutton" /></p>'."\n";
-	        $return_value .= '<ul class="logout-advance">'."\n";
+		$return_value .= '<form action="'.LOGOUT_URL.'" method="post" class="login-table">'."\n";
+    	$return_value .= '<fieldset>'."\n";
+		$return_value .= '<h1>'.$TEXT["LOGGED_IN"].'</h1>'."\n";
+		$return_value .= '<label>'.$TEXT['WELCOME_BACK'].', '.$wb->get_display_name().'</label>'."\n";
+		$return_value .= '<p><input type="submit" name="submit" value="'.$MENU['LOGOUT'].'" class="dbutton" /></p>'."\n";
+        $return_value .= '<ul class="logout-advance">'."\n";
+		if ($wb->ami_group_member('1')||$wb->get_permission('preferences'))
+        {
 			$return_value .= '<li class="preference"><a href="'.PREFERENCES_URL.'" title="'.$MENU['PREFERENCES'].'">'.$MENU['PREFERENCES'].'</a></li>'."\n";
+		}
 
-			if ($wb->ami_group_member('1'))  //change ot the group that should get special links
-	        {
-		        $return_admin .= '<li class="admin"><a target="_blank" href="'.ADMIN_URL.'/index.php" title="'.$TEXT['ADMINISTRATION'].'" class="blank_target">'.$TEXT["ADMINISTRATION"].'</a></li>'."\n";
-				//you can add more links for your users like userpage, lastchangedpages or something
-				$return_value .= $return_admin;
-			}
-            //change ot the group that should get special links
-			if( get_permission('pages_modify') && get_page_permission( PAGE_ID ) )
-	        {
-				$return_value .= '<li class="modify"><a target="_blank" href="'.ADMIN_URL.'/pages/modify.php?page_id='.PAGE_ID.'" title="'.$HEADING['MODIFY_PAGE'].'" class="blank_target">'.$HEADING['MODIFY_PAGE'].'</a></li>'."\n";
-	        }
-	        $return_value .= '</ul>'."\n";
-	        $return_value .= '</fieldset>'."\n";
-			$return_value .= '</form>'."\n";
+		//change ot the group that should get special links
+		if ($wb->ami_group_member('1')||$wb->get_permission('admintools'))
+        {
+	        $return_admin .= '<li class="admin"><a target="_blank" href="'.ADMIN_URL.'/index.php" title="'.$TEXT['ADMINISTRATION'].'" class="blank_target">'.$TEXT["ADMINISTRATION"].'</a></li>'."\n";
+			//you can add more links for your users like userpage, lastchangedpages or something
+			$return_value .= $return_admin;
+		}
+        //change ot the group that should get special links
+		if( $wb->get_permission('pages_modify') && $wb->get_page_permission( PAGE_ID ) )
+        {
+			$return_value .= '<li class="modify"><a target="_blank" href="'.ADMIN_URL.'/pages/modify.php?page_id='.PAGE_ID.'" title="'.$HEADING['MODIFY_PAGE'].'" class="blank_target">'.$HEADING['MODIFY_PAGE'].'</a></li>'."\n";
+        }
+        $return_value .= '<li>&nbsp;'.'</li>'."\n";
+        $return_value .= '</ul>'."\n";
+        $return_value .= '</fieldset>'."\n";
+		$return_value .= '</form>'."\n";
 	}
 	$return_value .= '</div>'."\n";
 	return $return_value;
Index: branches/2.8.x/wb/modules/droplets/uninstall.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/uninstall.php	(revision 1716)
+++ branches/2.8.x/wb/modules/droplets/uninstall.php	(revision 1717)
@@ -24,6 +24,7 @@
 	throw new IllegalFileException();
 }
 /* -------------------------------------------------------- */
+$database=WbDatabase::getInstance();
 
 $sql  = 'DROP TABLE IF EXISTS `'.TABLE_PREFIX.'mod_droplets` ';
 $database->query($sql);
Index: branches/2.8.x/wb/modules/droplets/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/droplets/upgrade.php	(revision 1716)
+++ branches/2.8.x/wb/modules/droplets/upgrade.php	(revision 1717)
@@ -24,7 +24,7 @@
 	throw new IllegalFileException();
 }
 /* -------------------------------------------------------- */
-
+$database=WbDatabase::getInstance();
 $table_name = TABLE_PREFIX .'mod_droplets';
 $description = 'INT NOT NULL default 0 ';
 $database->field_add($table_name,'show_wysiwyg',$description.'AFTER `active`' );
