[pLog-svn] r5530 - in plog/trunk: class/action/admin class/controller class/dao class/plugin class/view/admin locale/admin templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Tue Jun 12 05:30:15 EDT 2007


Author: mark
Date: 2007-06-12 05:30:14 -0400 (Tue, 12 Jun 2007)
New Revision: 5530

Added:
   plog/trunk/class/action/admin/adminaddfriendgroupaction.class.php
   plog/trunk/class/action/admin/admindeletefriendgroupaction.class.php
   plog/trunk/class/action/admin/admineditfriendgroupaction.class.php
   plog/trunk/class/action/admin/admineditfriendgroupsaction.class.php
   plog/trunk/class/action/admin/adminfriendnetworkaction.class.php
   plog/trunk/class/action/admin/adminnewfriendgroupaction.class.php
   plog/trunk/class/action/admin/adminupdatefriendgroupaction.class.php
   plog/trunk/class/view/admin/adminfriendgroupslistview.class.php
   plog/trunk/templates/admin/editfriendgroup.template
   plog/trunk/templates/admin/editfriendgroups.template
   plog/trunk/templates/admin/friendnetwork.template
   plog/trunk/templates/admin/newfriendgroup.template
Modified:
   plog/trunk/class/controller/admincontrollermap.properties.php
   plog/trunk/class/dao/friend.class.php
   plog/trunk/class/dao/friendauthorizationstatus.class.php
   plog/trunk/class/dao/friendgroup.class.php
   plog/trunk/class/dao/friendgroups.class.php
   plog/trunk/class/dao/friends.class.php
   plog/trunk/class/dao/location.class.php
   plog/trunk/class/dao/locations.class.php
   plog/trunk/class/dao/userauthorizationstatus.class.php
   plog/trunk/class/plugin/eventlist.properties.php
   plog/trunk/locale/admin/locale_en_UK.php
   plog/trunk/locale/admin/locale_zh_CN.php
   plog/trunk/locale/admin/locale_zh_TW.php
   plog/trunk/templates/admin/menus.xml
   plog/trunk/templates/admin/navigation.template
Log:
Admin panels for friend groups done.

Added: plog/trunk/class/action/admin/adminaddfriendgroupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminaddfriendgroupaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/adminaddfriendgroupaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,68 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/adminfriendgroupslistview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that takes care of adding a new friend group
+     */
+    class AdminAddFriendGroupAction extends AdminAction
+	{
+
+    	var $_groupName;
+    	var $_groupDescription;
+		var $_properties;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminAddFriendGroupAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+
+			// data validation
+			$this->registerFieldValidator( "groupName", new StringValidator() );
+			$this->registerField( "groupDescription" );
+			$this->setValidationErrorView( new AdminTemplatedView( $this->_blogInfo, "newfriendgroup" ));
+        }
+
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// add the new link category to the database
+			$this->_groupName = Textfilter::filterAllHTML($this->_request->getValue( "groupName" ));
+			$this->_groupDescription = Textfilter::filterAllHTML($this->_request->getValue( "groupDescription" ));
+            $friendGroups = new FriendGroups();
+            $friendGroup = new FriendGroup( $this->_userInfo->getId(),
+            								$this->_groupName,
+            								$this->_groupDescription,
+											$this->_properties );
+			// the view is the same for both conditions
+           	$this->_view = new AdminFriendGroupsListView( $this->_blogInfo );
+
+            if( !$friendGroups->addFriendGroup( $friendGroup, $this->_userInfo->getId())) {
+				// set an error message
+                $this->_view->setErrorMessage( $this->_locale->tr("error_adding_friend_group"));
+            }
+			else {
+				// clear the cache
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
+				$this->_view->setSuccessMessage( $this->_locale->pr("friend_group_added_ok", $friendGroup->getName()));
+			}
+
+            $this->setCommonData();
+
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plog/trunk/class/action/admin/admindeletefriendgroupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindeletefriendgroupaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/admindeletefriendgroupaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,112 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/arrayvalidator.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminfriendgroupslistview.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that deletes a friend group from the database
+     */
+    class AdminDeleteFriendGroupAction extends AdminAction
+	{
+
+        var $_groupIds;
+		var $_op;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminDeleteFriendGroupAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+
+			$this->_op = $actionInfo->getActionParamValue();
+
+			$view = new AdminFriendGroupsListView( $this->_blogInfo );
+			if( $this->_op == "deleteFriendGroup" )
+				$this->registerFieldValidator( "groupId", new IntegerValidator());
+			else
+				$this->registerFieldValidator( "groupIds", new ArrayValidator());
+			$view->setErrorMessage( $this->_locale->tr("error_invalid_friend_group_id"));
+			$this->setValidationErrorView( $view );
+        }
+
+		function perform()
+		{
+			if( $this->_op == "deleteFriendGroup" ) {
+				$this->_groupId = $this->_request->getValue( "groupId" );
+				$this->_groupIds = Array();
+				$this->_groupIds[] = $this->_groupId;
+			}
+			else
+				$this->_groupIds = $this->_request->getValue( "groupIds" );
+
+			$this->_deleteFriendGroups();
+		}
+
+        /**
+         * Carries out the specified action
+		 * @static
+         */
+        function _deleteFriendGroups()
+        {
+        	// delete the friend group, but only if there are no links under it
+            $groups = new FriendGroups();
+            $errorMessage = "";
+			$successMessage = "";
+			$totalOk = 0;
+
+            foreach( $this->_groupIds as $groupId ) {
+            	// fetch the group
+                $group = $groups->getFriendGroup( $groupId, $this->_userInfo->getId());
+            	
+                if( $group ) {
+	            	// Check if the last friend group reached
+	            	if( $groups->getNumUserFriendGroups( $this->_userInfo->getId() ) <= 1) {
+	            		$errorMessage .= $this->_locale->pr("error_removing_last_friend_group", $group->getName());
+	            		break;
+	            	}
+
+					if( $group->getNumFriends() > 0 ) {
+                		$errorMessage .= $this->_locale->pr("error_friends_in_friend_group", $group->getName())."<br/>";
+                	}
+                	else {
+            			// if all correct, now delete it and check how it went
+            			if( !$groups->deleteFriendGroup( $groupId, $this->_userInfo->getId())) {
+                        	$errorMessage .= $this->_locale->pr("error_removing_friend_group", $group->getName());
+            			}
+                    	else {
+							$totalOk++;
+							if( $totalOk < 2 )
+								$successMessage = $this->_locale->pr( "friend_group_deleted_ok", $group->getName());
+							else
+								$successMessage = $this->_locale->pr( "friend_groups_deleted_ok", $totalOk );
+						}
+                	}
+                }
+                else {
+                	$errorMessage .= $this->_locale->pr("error_removing_friend_group2", $groupId )."<br/>";
+                }
+            }
+
+            $this->_view = new AdminFriendGroupsListView( $this->_blogInfo );
+            if( $errorMessage != "" ) $this->_view->setErrorMessage( $errorMessage );
+			if( $successMessage != "" ) {
+				$this->_view->setSuccessMessage( $successMessage );
+				// clear the cache
+				CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
+			}
+
+            $this->setCommonData();
+
+            // better to return true if everything fine
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plog/trunk/class/action/admin/admineditfriendgroupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditfriendgroupaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/admineditfriendgroupaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,63 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminfriendgroupslistview.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that shows a form to change the settings of the friend group
+     */
+    class AdminEditFriendGroupAction extends AdminAction
+	{
+
+    	var $_groupId;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminEditFriendGroupAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+
+			// data validation
+			$this->registerFieldValidator( "groupId", new IntegerValidator());
+			$view = new AdminFriendGroupsListView( $this->_blogInfo );
+			$view->setErrorMessage( $this->_locale->tr("error_incorrect_friend_group_id"));
+			$this->setValidationErrorView( $view );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// fetch the group
+			$this->_groupId = $this->_request->getValue( "groupId" );
+            $groups = new FriendGroups();
+            $group   = $groups->getFriendGroup( $this->_groupId, $this->_userInfo->getId());
+            // show an error if we couldn't fetch the relatinoship
+            if( !$group ) {
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_link_category"));
+                $this->setCommonData();
+
+                return false;
+            }
+			$this->notifyEvent( EVENT_FRIEND_GROUP_LOADED, Array( "friendgroup" => &$group ));
+            // otherwise show the form to edit its fields
+        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "editfriendgroup" );
+			$this->_view->setValue( "groupId", $group->getId());
+        	$this->_view->setValue( "groupName", $group->getName());
+			$this->_view->setValue( "groupDescription", $group->getDescription());
+            $this->setCommonData();
+
+            // better to return true if everything fine
+            return true;
+        }
+    }
+?>

Added: plog/trunk/class/action/admin/admineditfriendgroupsaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admineditfriendgroupsaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/admineditfriendgroupsaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,38 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/adminfriendgroupslistview.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that shows the list friend groups
+     */
+    class AdminEditFriendGroupsAction extends AdminAction
+	{
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminEditFriendGroupsAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+            // get all the friend groups
+			$searchTerms = $this->_request->getValue( "searchTerms" );
+            $this->_view = new AdminFriendGroupsListView( $this->_blogInfo, Array( "searchTerms" => $searchTerms ) );
+            $this->setCommonData();
+
+            // better to return true if everything fine
+            return true;
+        }
+    }
+?>

Added: plog/trunk/class/action/admin/adminfriendnetworkaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminfriendnetworkaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/adminfriendnetworkaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,37 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Shows the menu group for the "Friend Network" option
+     */
+    class AdminFriendNetworkAction extends AdminAction 
+	{
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminFriendNetworkAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// create the view, which will take care of fetching the right data
+        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "friendnetwork" );
+            $this->setCommonData();
+
+            // better to return true if everything fine
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plog/trunk/class/action/admin/adminnewfriendgroupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminnewfriendgroupaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/adminnewfriendgroupaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,35 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Action that adds a new friend
+     */
+    class AdminNewFriendGroupAction extends AdminAction
+    {
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminNewFriendGroupAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// initialize the view
+        	$this->_view = new AdminTemplatedView( $this->_blogInfo, "newfriendgroup" );
+            $this->setCommonData();
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Added: plog/trunk/class/action/admin/adminupdatefriendgroupaction.class.php
===================================================================
--- plog/trunk/class/action/admin/adminupdatefriendgroupaction.class.php	                        (rev 0)
+++ plog/trunk/class/action/admin/adminupdatefriendgroupaction.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,83 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/action/admin/adminaction.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/view/admin/adminfriendgroupslistview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/data/validator/integervalidator.class.php" );
+
+    /**
+     * \ingroup Action
+     * @private
+     *
+     * Updates an friend group.
+     */
+    class AdminUpdateFriendGroupAction extends AdminAction
+	{
+
+    	var $_groupName;
+    	var $_groupDescription;
+        var $_groupId;
+
+    	/**
+         * Constructor. If nothing else, it also has to call the constructor of the parent
+         * class, BlogAction with the same parameters
+         */
+        function AdminUpdateFriendGroupAction( $actionInfo, $request )
+        {
+        	$this->AdminAction( $actionInfo, $request );
+
+			// data validation
+			$this->registerFieldValidator( "groupName", new StringValidator());
+			$this->registerFieldValidator( "groupId", new IntegerValidator());
+			$this->registerField( "groupDescription" );
+			$errorView = new AdminTemplatedView( $this->_blogInfo, "editfriendgroup" );
+			$errorView->setErrorMessage( $this->_locale->tr("error_updating_friend_group"));
+			$this->setValidationErrorView( $errorView );
+        }
+
+        /**
+         * Carries out the specified action
+         */
+        function perform()
+        {
+        	// fetch the group we're trying to update
+			$this->_groupId = $this->_request->getValue( "groupId" );
+			$this->_groupName = Textfilter::filterAllHTML($this->_request->getValue( "groupName" ));
+			$this->_groupDescription = Textfilter::filterAllHTML($this->_request->getValue( "groupDescription" ));
+            $groups = new FriendGroups();
+            $group   = $groups->getFriendGroup( $this->_groupId, $this->_userInfo->getId());
+            if( !$group ) {
+            	$this->_view = new AdminFriendGroupsListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_fetching_friend_group"));
+                $this->setCommonData();
+
+                return false;
+            }
+
+            // update the fields
+            $group->setName( $this->_groupName );
+            $group->setDescription( $this->_groupDescription );
+			$this->notifyEvent( EVENT_PRE_UPDATE_FRIEND_GROUP, Array( "friendgroup" => &$group ));
+            if( !$groups->updateFriendGroup( $group )) {
+            	$this->_view = new AdminFriendGroupsListView( $this->_blogInfo );
+                $this->_view->setErrorMessage( $this->_locale->tr("error_updating_friend_group"));
+                $this->setCommonData();
+
+                return false;
+            }
+			$this->notifyEvent( EVENT_POST_UPDATE_FRIEND_GROUP, Array( "friendgroup" => &$group ));
+
+			// clear the cache
+			CacheControl::resetBlogCache( $this->_blogInfo->getId(), false );
+
+            $this->_view = new AdminFriendGroupsListView( $this->_blogInfo );
+            $this->_view->setSuccessMessage( $this->_locale->pr("friend_group_updated_ok", $group->getName()));
+            $this->setCommonData();
+
+            // better to return true if everything fine
+            return true;
+        }
+    }
+?>
\ No newline at end of file

Modified: plog/trunk/class/controller/admincontrollermap.properties.php
===================================================================
--- plog/trunk/class/controller/admincontrollermap.properties.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/controller/admincontrollermap.properties.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -330,5 +330,15 @@
 	$actions['adminLocationDisplay'] = 'AdminLocationDisplayAction';
 	$actions['showBlogLocations'] = 'AdminShowBlogLocationsAction';	
 	$actions['updateLocation'] = 'AdminUpdateLocationAjaxAction';
-	$actions['addLocation'] = 'AdminAddLocationAjaxAction';	
+	$actions['addLocation'] = 'AdminAddLocationAjaxAction';
+    // shows a window with all the friends action
+    $actions["friendNetwork"] = "AdminFriendNetworkAction";
+	// add this for friend relationship.
+	$actions["newFriendGroup"] = "AdminNewFriendGroupAction";
+  	$actions["addFriendGroup"] = "AdminAddFriendGroupAction";
+	$actions["editFriendGroups"] = "AdminEditFriendGroupsAction";
+  	$actions["editFriendGroup"] = "AdminEditFriendGroupAction";
+  	$actions["deleteFriendGroups"] = "AdminDeleteFriendGroupAction";
+  	$actions["deleteFriendGroup"] = "AdminDeleteFriendGroupAction";
+  	$actions["updateFriendGroup"] = "AdminUpdateFriendGroupAction";
 ?>
\ No newline at end of file

Modified: plog/trunk/class/dao/friend.class.php
===================================================================
--- plog/trunk/class/dao/friend.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/friend.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,9 +1,9 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/userauthorizationstatus.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/friendauthorizationstatus.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/userauthorizationstatus.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/friendauthorizationstatus.class.php" );
 
     /**
 	 * \ingroup DAO
@@ -19,7 +19,7 @@
         var $_groupId;
 		var $_description;
         var $_userAuthorizationStatus;
-        var $_friendAuthorizationStatus;
+        var $_friendAuthorizationStatus;
         var $_friendInfo;
 
         /**
@@ -196,18 +196,18 @@
 		
 		function getFriendInfo()
 		{
-			if( $this->_friendInfo )
-				return $this->_friendInfo;
-			else {
-				include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
+			if( $this->_friendInfo )
+				return $this->_friendInfo;
+			else {
+				lt_include( PLOG_CLASS_PATH."class/dao/users.class.php" );
 				$users =& new Users();
 				$friendInfo = $users->getUserInfoFromId( $this->_friendId );
-				if( $friendInfo ) {
+				if( $friendInfo ) {
 					$this->_friendInfo = $friendInfo;
-					return $friendInfo;
+					return $friendInfo;
 				}
 				else
-					return false;
+					return false;
 			}
 		}
 }

Modified: plog/trunk/class/dao/friendauthorizationstatus.class.php
===================================================================
--- plog/trunk/class/dao/friendauthorizationstatus.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/friendauthorizationstatus.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,6 +1,6 @@
 <?php
 
-    include_once( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
 	
 	define( "FRIEND_AUTHORIZATION_ALL", -1, true ); 
     define( "FRIEND_AUTHORIZATION_APPROVED", 1, true );

Modified: plog/trunk/class/dao/friendgroup.class.php
===================================================================
--- plog/trunk/class/dao/friendgroup.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/friendgroup.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,8 +1,8 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/userauthorizationstatus.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/friendauthorizationstatus.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/userauthorizationstatus.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/friendauthorizationstatus.class.php" );
 
     /**
 	 * \ingroup DAO
@@ -131,7 +131,7 @@
         	elseif( $userAuthorizationStatus == USER_AUTHORIZATION_APPROVED && $friendAuthorizationStatus == FRIEND_AUTHORIZATION_APPROVED )
         		return( $this->_numAuthorizedFriends );
         	else {
-	        	include_once( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+	        	lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
     	    	$groups = new FriendGroups();
         		return( $groups->getNumFriendsGroup( $this->getId(), $userAuthorizationStatus, $friendAuthorizationStatus ) );
         	}
@@ -187,7 +187,7 @@
 		 */
 		function getFriends( $userAuthorizationStatus = -1, $friendAuthorizationStatus = -1, $searchTerms = "", $page = -1, $itemsPerPage = 15 )
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/friens.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/friens.class.php" );
 			$friends = Friends::getFriends( $this->_userId, $this->_id, $userAuthorizationStatus, $friendAuthorizationStatus, $searchTerms, $page, $itemsPerPage );
 		}
 
@@ -218,7 +218,7 @@
 		function getMangledName()
 		{
 			if( $this->_mangledName == "" ) {
-				include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
+				lt_include( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
 				$this->_mangledName = Textfilter::urlize( $this->getName() );
 			}
 

Modified: plog/trunk/class/dao/friendgroups.class.php
===================================================================
--- plog/trunk/class/dao/friendgroups.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/friendgroups.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,8 +1,8 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/friendgroup.class.php" );
-	include_once( PLOG_CLASS_PATH.'class/dao/daocacheconstants.properties.php' );
+	lt_include( PLOG_CLASS_PATH."class/dao/model.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/friendgroup.class.php" );
+	lt_include( PLOG_CLASS_PATH.'class/dao/daocacheconstants.properties.php' );
 
 	class FriendGroups extends Model
 	{

Modified: plog/trunk/class/dao/friends.class.php
===================================================================
--- plog/trunk/class/dao/friends.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/friends.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,8 +1,8 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
-    include_once( PLOG_CLASS_PATH."class/dao/friend.class.php" );
-	include_once( PLOG_CLASS_PATH.'class/dao/daocacheconstants.properties.php' );
+	lt_include( PLOG_CLASS_PATH."class/dao/model.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/friend.class.php" );
+	lt_include( PLOG_CLASS_PATH.'class/dao/daocacheconstants.properties.php' );
 
     /**
 	 * \ingroup DAO
@@ -85,7 +85,7 @@
 		 */
 		function updateFriendGroupCounters( $newFriend, $oldFriend = null )
 		{
-			include_once( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+			lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
 			$groups = new FriendGroups();
 			$newGroup = $groups->getFriendGroup( $newFriend->getFriendGroupId() );
 

Modified: plog/trunk/class/dao/location.class.php
===================================================================
--- plog/trunk/class/dao/location.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/location.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,6 +1,6 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/database/dbobject.class.php" );
 
 	class Location extends DbObject
 	{

Modified: plog/trunk/class/dao/locations.class.php
===================================================================
--- plog/trunk/class/dao/locations.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/locations.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,7 +1,7 @@
 <?php
 
-	include_once( PLOG_CLASS_PATH."class/dao/model.class.php" );
-	include_once( PLOG_CLASS_PATH."class/dao/location.class.php" );	
+	lt_include( PLOG_CLASS_PATH."class/dao/model.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/location.class.php" );	
 	
 	define( "CACHE_LOCATION_BY_ID", "location_by_id" );
 	define( "CACHE_LOCATIONS_BY_BLOG", "locations_by_blog" );

Modified: plog/trunk/class/dao/userauthorizationstatus.class.php
===================================================================
--- plog/trunk/class/dao/userauthorizationstatus.class.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/dao/userauthorizationstatus.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1,6 +1,6 @@
 <?php
 
-    include_once( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
+    lt_include( PLOG_CLASS_PATH."class/dao/status/genericstatuslist.class.php" );
 	
 	define( "USER_AUTHORIZATION_ALL", -1, true ); 
     define( "USER_AUTHORIZATION_APPROVED", 1, true );

Modified: plog/trunk/class/plugin/eventlist.properties.php
===================================================================
--- plog/trunk/class/plugin/eventlist.properties.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/class/plugin/eventlist.properties.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -187,4 +187,13 @@
 	define( "EVENT_POST_DELETE_PERMISSION", ++$eventValue );
     define( "EVENT_PROCESS_BLOG_ADMIN_TEMPLATE_OUTPUT", ++$eventValue );
     define( "EVENT_POST_ADMIN_PURGE_TEMP_FOLDER", ++$eventValue );
+	// friend groups
+	define( "EVENT_PRE_ADD_FRIEND_GROUP", ++$eventValue );
+	define( "EVENT_POST_ADD_FRIEND_GROUP", ++$eventValue );
+	define( "EVENT_PRE_UPDATE_FRIEND_GROUP", ++$eventValue );
+	define( "EVENT_POST_UPDATE_FRIEND_GROUP", ++$eventValue );
+	define( "EVENT_PRE_DELETE_FRIEND_GROUP", ++$eventValue );
+	define( "EVENT_POST_DELETE_FRIEND_GROUP", ++$eventValue );
+	define( "EVENT_FRIEND_GROUP_LOADED", ++$eventValue );
+	define( "EVENT_FRIEND_GROUPS_LOADED", ++$eventValue );
 ?>
\ No newline at end of file

Added: plog/trunk/class/view/admin/adminfriendgroupslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminfriendgroupslistview.class.php	                        (rev 0)
+++ plog/trunk/class/view/admin/adminfriendgroupslistview.class.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,56 @@
+<?php
+
+	lt_include( PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/dao/friendgroups.class.php" );
+	lt_include( PLOG_CLASS_PATH."class/data/pager/pager.class.php" );
+
+    /**
+     * \ingroup View
+     * @private
+     *
+	 * shows a list of friend groups
+	 */
+	class AdminFriendGroupsListView extends AdminTemplatedView
+	{
+		var $_page;
+
+		function AdminFriendGroupsListView( $blogInfo, $params = Array())
+		{
+			$this->AdminTemplatedView( $blogInfo, "editfriendgroups" );
+
+			$this->_page = $this->getCurrentPageFromRequest();
+			if( isset( $params['searchTerms'] ) )
+				$this->_searchTerms = $params['searchTerms'];
+			else
+				$this->_searchTerms = "";
+		}
+
+		function render()
+		{
+			// get the link categories
+            $groups = new FriendGroups();
+            $friendGroups = $groups->getUserFriendGroups( $this->_userInfo->getId(),
+														   $this->_searchTerms,
+														   $this->_page,
+														   DEFAULT_ITEMS_PER_PAGE );
+			// get the total number of friend groups
+			$numFriendGroups = $groups->getNumUserFriendGroups( $this->_userInfo->getId(), $this->_searchTerms );
+
+			// throw the event
+			$this->notifyEvent( EVENT_FRIEND_GROUPS_LOADED, Array( "friendgroups" => &$friendGroups ));
+
+			// create the pager
+			$pager = new Pager( "?op=editFriendGroups&amp;page=",
+			                    $this->_page,
+								$numFriendGroups,
+								DEFAULT_ITEMS_PER_PAGE );
+
+            // create the view and fill the template context
+            $this->setValue( "friendgroups", $friendGroups );
+			$this->setValue( "pager", $pager );
+
+			// transfer control to the parent class
+			parent::render();
+		}
+	}
+?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_en_UK.php
===================================================================
--- plog/trunk/locale/admin/locale_en_UK.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/locale/admin/locale_en_UK.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1183,4 +1183,35 @@
 all files should match the expected version. Please be patient, this process may take a while.';
 $messages['check'] = 'Check';
 $messages['all_files_ok'] = 'All files are correct';
+
+/// new strings in LT 1.3 ///
+// friend network
+$messages['friendNetwork'] = 'Friend Network';
+$messages['friend'] = 'Friend'; 
+$messages['friends'] = 'Friends'; 
+$messages['manageFriends'] = 'Friend Management';
+$messages['newFriendGroup'] = 'New Friend Group';
+$messages['editFriendGroups'] = 'Edit Friend Groups';
+$messages['editFriendGroup'] = 'Edit Friend Group';
+
+// new friend group
+$messages['group_name_help'] = 'Name that will be used to display the friend group.';
+$messages['group_description_help'] = 'Longer description for this friend group.';
+$messages['error_adding_friend_group'] = 'There was an error adding the new friend group. Please check the data and try again';
+$messages['friend_group_added_ok'] = 'Friend group "%s" was successfully added to the user.'; 
+
+// edit friend relationship
+$messages['error_updating_friend_group'] = 'There was an error updating the friend group.';
+$messages['friend_group_updated_ok'] = 'Friend group "%s" was updated successfully.';
+$messages['error_fetching_friend_group'] = 'There was an error while fetching the friend group.';
+
+// delete friend relationship
+$messages['error_invalid_friend_group_id'] = 'The friend group identifier was not correct or there was no link category selected.';
+$messages['error_friends_in_friend_group'] = 'Friend group "%s" is used by some friends. Modify the friends first and try again.';
+$messages['error_removing_friend_group'] = 'There was an error removing friend group "%s".';
+$messages['friend_group_deleted_ok'] = 'Friend group "%s" deleted successfully.';
+$messages['friend_groups_deleted_ok'] = '%s friend groups deleted successfully.';
+$messages['error_removing_friend_group2'] = 'There was an error removing friend group with identifier "%s".';
+ 
+$messages['error_removing_last_friend_group'] = 'There was an error removing the last friend group "%s".';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_zh_CN.php
===================================================================
--- plog/trunk/locale/admin/locale_zh_CN.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/locale/admin/locale_zh_CN.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1184,4 +1184,35 @@
 所有文件的内容应该都会符合检查的结果。请耐心等候,这个检查需要花一点时间。';
 $messages['check'] = '检查';
 $messages['all_files_ok'] = '所有档案都正确。';
+
+/// new strings in LT 1.3 ///
+// friend network
+$messages['friendNetwork'] = '好友网络';
+$messages['friend'] = '好友'; 
+$messages['friends'] = '好友'; 
+$messages['manageFriends'] = '好友群组管理';
+$messages['newFriendGroup'] = '新增好友群组';
+$messages['editFriendGroups'] = '好友群组列表';
+$messages['editFriendGroup'] = '编辑好友群组';
+
+// new friend group
+$messages['group_name_help'] = '请输入好友群组的名称。';
+$messages['group_description_help'] = '关于这个好友群组的描述。';
+$messages['error_adding_friend_group'] = '新增好友群组时发生错误。';
+$messages['friend_group_added_ok'] = '好友群组“%s”已顺利新增'; 
+
+// edit friend relationship
+$messages['error_updating_friend_group'] = '更新好友群组时发生错误。请检查输入资料后,再试一次。';
+$messages['friend_group_updated_ok'] = '好友群组“%s”已顺利更新';
+$messages['error_fetching_friend_group'] = '读取好友群组资料时发生错误。';
+
+// delete friend relationship
+$messages['error_invalid_friend_group_id'] = '好友群组ID不正确或没有选择好友群组,无法删除。';
+$messages['error_friends_in_friend_group'] = '无法删除“%s”这个好友群组,因为该群组下还有好友。请先删除好友后,在试一次。';
+$messages['error_removing_friend_group'] = '在删除好友群组“%s”时发生错误。';
+$messages['friend_group_deleted_ok'] = '好友群组“%s”已顺利删除。';
+$messages['friend_groups_deleted_ok'] = '好友群组“%s”已顺利删除。';
+$messages['error_removing_friend_group2'] = '删除好友群组时发生错误 (id = %s)';
+ 
+$messages['error_removing_last_friend_group'] = '无法删除“%s”这个好友群组,因为至少要有一个好友群组。';
 ?>
\ No newline at end of file

Modified: plog/trunk/locale/admin/locale_zh_TW.php
===================================================================
--- plog/trunk/locale/admin/locale_zh_TW.php	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/locale/admin/locale_zh_TW.php	2007-06-12 09:30:14 UTC (rev 5530)
@@ -1184,4 +1184,35 @@
 所有檔案的內容應該都會符合檢查的結果。請耐心等候,這個檢查需要花一點時間。';
 $messages['check'] = '檢查';
 $messages['all_files_ok'] = '所有檔案都正確。';
+
+/// new strings in LT 1.3 ///
+// friend network
+$messages['friendNetwork'] = '好友網絡';
+$messages['friend'] = '好友'; 
+$messages['friends'] = '好友'; 
+$messages['manageFriends'] = '好友群組管理';
+$messages['newFriendGroup'] = '新增好友群組';
+$messages['editFriendGroups'] = '好友群組列表';
+$messages['editFriendGroup'] = '編輯好友群組';
+
+// new friend group
+$messages['group_name_help'] = '請輸入好友群組的名稱。';
+$messages['group_description_help'] = '關於這個好友群組的描述。';
+$messages['error_adding_friend_group'] = '新增好友群組時發生錯誤。';
+$messages['friend_group_added_ok'] = '好友群組「%s」已順利新增'; 
+
+// edit friend relationship
+$messages['error_updating_friend_group'] = '更新好友群組時發生錯誤。請檢查輸入資料後,再試一次。';
+$messages['friend_group_updated_ok'] = '好友群組「%s」已順利更新';
+$messages['error_fetching_friend_group'] = '讀取好友群組資料時發生錯誤。';
+
+// delete friend relationship
+$messages['error_invalid_friend_group_id'] = '好友群組ID不正確或沒有選擇好友群組,無法刪除。';
+$messages['error_friends_in_friend_group'] = '無法刪除「%s」這個好友群組,因為該群組下還有好友。請先刪除好友後,在試一次。';
+$messages['error_removing_friend_group'] = '在刪除好友群組「%s」時發生錯誤。';
+$messages['friend_group_deleted_ok'] = '好友群組「%s」已順利刪除。';
+$messages['friend_groups_deleted_ok'] = '好友群組「%s」已順利刪除。';
+$messages['error_removing_friend_group2'] = '刪除好友群組時發生錯誤 (id = %s)';
+ 
+$messages['error_removing_last_friend_group'] = '無法刪除「%s」這個好友群組,因為至少要有一個好友群組。';
 ?>
\ No newline at end of file

Added: plog/trunk/templates/admin/editfriendgroup.template
===================================================================
--- plog/trunk/templates/admin/editfriendgroup.template	                        (rev 0)
+++ plog/trunk/templates/admin/editfriendgroup.template	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,36 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editFriendGroups title=$locale->tr("editFriendGroups")}
+
+ <form name="editFriendGroup" action="admin.php" method="post">
+
+  <fieldset class="inputField">
+   <legend>{$locale->tr("editFriendGroup")}</legend>
+   {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_updating_friend_group")}
+
+   <div class="field">
+    <label for="groupName">{$locale->tr("name")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("category_name_help")}</div>
+    <input type="text" id="groupName" name="groupName" value="{$groupName|escape:"html"}"/>
+    {include file="$admintemplatepath/validate.template" field=groupName message=$locale->tr("error_empty_name")}
+   </div>
+
+   <div class="field">
+    <label for="groupDescription">{$locale->tr("description")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("category_description_help")}</div>
+    <textarea name="groupDescription" id="groupDescription" cols="60" rows="5">{$groupDescription}</textarea>
+    {include file="$admintemplatepath/validate.template" field=groupDescription message=$locale->tr("error_empty_description")}
+  </div>
+
+  </fieldset>
+  <div class="buttons">
+    <input type="reset" name="reset" value="{$locale->tr("reset")}" />
+    <input type="submit" name="Update" value="{$locale->tr("update")}" />
+    <input type="hidden" name="op" value="updateFriendGroup" />
+    <input type="hidden" name="groupId" value="{$groupId}" />
+  </div>
+</form>
+
+{include file="$blogtemplate/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/editfriendgroups.template
===================================================================
--- plog/trunk/templates/admin/editfriendgroups.template	                        (rev 0)
+++ plog/trunk/templates/admin/editfriendgroups.template	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,72 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=editFriendGroups title=$locale->tr("editFriendGroups")}
+
+        <div id="list_nav_bar">
+            <div id="list_nav_select">
+
+<form id="viewFriendGroup" action="admin.php" method="post">
+ <fieldset>
+  <legend>{$locale->tr("show_by")}</legend>
+
+   <div class="list_nav_option">
+   <label for="search">{$locale->tr("search_terms")}</label>
+   <br />
+   <input type="text" name="searchTerms" value="{$searchTerms}" size="15" id="search" />
+   </div>
+
+   <div class="list_nav_option">
+    <br />
+    <input type="hidden" name="op" value="editFriendGroups" />
+    <input type="submit" name="Show" value="{$locale->tr("show")}" />
+   </div>
+  </fieldset>
+ </form>
+ </div>
+ <br style="clear:both" />
+ </div>
+
+ <form id="friendGroups" action="admin.php" method="post">
+ <div id="list">
+  {include file="$admintemplatepath/successmessage.template"}
+  {include file="$admintemplatepath/errormessage.template"}
+ <table class="info">
+  <thead>
+   <tr>
+    <th style="width:10px;"><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('friendGroups');" /></th>
+    <th style="width:500px;">{$locale->tr("name")}</th>
+    <th style="width:170px;">{$locale->tr("friends")}</th>
+    <th style="width:95px;">{$locale->tr("actions")}</th>
+   </tr>
+  </thead>
+  <tbody>
+  {foreach from=$friendgroups item=group}
+  <tr class="{cycle values="odd,even"}">
+   <td align="center"><input class="checkbox" type="checkbox" name="groupIds[{counter}]" value="{$group->getId()}"/></td>
+   <td class="col_highlighted"><a href="admin.php?op=editFriendGroup&amp;groupId={$group->getId()}">{$group->getName()}</a></td>
+   <td>
+     {if $group->getNumFriends() > 0}
+      <a href="admin.php?op=editFriends&amp;showGroup={$group->getId()}">({$group->getNumFriends()})</a>
+     {else}
+      (0)
+    {/if}
+   </td>
+   <td>
+     <div class="list_action_button">
+       <a href="?op=editFriendGroup&amp;groupId={$group->getId()}"><img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" /></a>
+       <a href="?op=deleteFriendGroup&amp;groupId={$group->getId()}"><img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" /></a>
+     </div>
+   </td>
+  </tr>
+  {/foreach}
+ </tbody>
+ </table>
+ </div>
+ <div id="list_action_bar">
+  {adminpager style=list}
+  <input type="hidden" name="op" value="deleteFriendGroups"/>
+  <input type="submit" name="Delete selected" value="{$locale->tr("delete")}"/>
+ </div>
+ </form>
+
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}
\ No newline at end of file

Added: plog/trunk/templates/admin/friendnetwork.template
===================================================================
--- plog/trunk/templates/admin/friendnetwork.template	                        (rev 0)
+++ plog/trunk/templates/admin/friendnetwork.template	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,5 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=friendNetwork title=$locale->tr("friendNetwork")}
+{$menu->generateAt("friendNetwork",2)}
+</div>
+{include file="$admintemplatepath/footer.template"}

Modified: plog/trunk/templates/admin/menus.xml
===================================================================
--- plog/trunk/templates/admin/menus.xml	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/templates/admin/menus.xml	2007-06-12 09:30:14 UTC (rev 5530)
@@ -25,13 +25,19 @@
 	  	<newResourceAlbum url="?op=newResourceAlbum" andPerms="add_album" />
 	  	<resources url="?op=resources" andPerms="view_resources" />
 	  </resourceCenter> 
-	</ResourcesGroup>  
+	</ResourcesGroup>
+	<friendNetwork url="?op=friendNetwork">
+	  <manageFriends ignoreBreadCrumbs="1">
+	    <newFriendGroup url="?op=newFriendGroup"/> 		     
+	    <editFriendGroups url="?op=editFriendGroups"/>
+	  </manageFriends>
+	</friendNetwork>
 	<controlCenter url="?op=controlCenter">
 	    <manageSettings ignoreBreadCrumbs="1"> 
   		  <blogSettings url="?op=blogSettings" andPerms="update_blog" />	
 		  <userSettings url="?op=userSettings" />
 		  <Stats url="?op=Stats" andPerms="view_blog_stats" />
-		</manageSettings> 
+		</manageSettings>
 		<manageBlogUsers ignoreBreadCrumbs="1" orPerms="add_blog_user,view_blog_users"> 
 		  <newBlogUser url="?op=newBlogUser" andPerms="add_blog_user" />
 		  <showBlogUsers url="?op=showBlogUsers" andPerms="view_blog_users" />

Modified: plog/trunk/templates/admin/navigation.template
===================================================================
--- plog/trunk/templates/admin/navigation.template	2007-06-12 09:28:40 UTC (rev 5529)
+++ plog/trunk/templates/admin/navigation.template	2007-06-12 09:30:14 UTC (rev 5530)
@@ -13,6 +13,6 @@
 			{/if}
             <br style="clear:both;" />
         </div>
-        {if $templatename != "main" && $templatename != "controlcenter" && $templatename != "adminsettings" && $templatename != "resourcesgroup" && $templatename != "error" && $templatename != "message" }
+        {if $templatename != "main" && $templatename != "controlcenter" && $templatename != "adminsettings" && $templatename != "resourcesgroup" && $templatename != "friendnetwork" && $templatename != "error" && $templatename != "message" }
           {include file="$admintemplatepath/menutabs.template"}
         {/if}
\ No newline at end of file

Added: plog/trunk/templates/admin/newfriendgroup.template
===================================================================
--- plog/trunk/templates/admin/newfriendgroup.template	                        (rev 0)
+++ plog/trunk/templates/admin/newfriendgroup.template	2007-06-12 09:30:14 UTC (rev 5530)
@@ -0,0 +1,33 @@
+{include file="$admintemplatepath/header.template"}
+{include file="$admintemplatepath/navigation.template" showOpt=newFriendGroup title=$locale->tr("newFriendGroup")}
+
+ <form name="addFriendGroup" method="post" action="admin.php">
+  <fieldset class="inputField">
+   <legend>{$locale->tr("newFriendGroup")}</legend>
+   {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_adding_friend_group")}
+
+   <div class="field">
+    <label for="groupName">{$locale->tr("name")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("group_name_help")}</div>
+    <input type="text" value="{$groupName}" id="groupName" name="groupName" />
+    {include file="$admintemplatepath/validate.template" field=groupName message=$locale->tr("error_empty_name")}
+   </div>
+
+   <div class="field">
+    <label for="groupDescription">{$locale->tr("description")}</label>
+    <span class="required">*</span>
+    <div class="formHelp">{$locale->tr("group_description_help")}</div>
+    <textarea name="groupDescription" cols="60" id="groupDescription" rows="5">{$groupDescription}</textarea>
+    {include file="$admintemplatepath/validate.template" field=groupDescription message=$locale->tr("error_empty_description")}
+   </div>
+
+  </fieldset>
+  <div class="buttons">
+   <input type="hidden" name="op" value="addFriendGroup" />
+   <input type="reset" name="Reset" value="{$locale->tr("reset")}" />
+   <input type="submit" name="Add" value="{$locale->tr("add")}" />
+  </div>
+ </form>
+{include file="$admintemplatepath/footernavigation.template"}
+{include file="$admintemplatepath/footer.template"}



More information about the pLog-svn mailing list