I need to add some custom pages to my phpgedview website, but the new pages must be visible only to registered users.
How can I do it?
You'd need to create new menu entries that show only when the user is logged in. There are functions for both tasks already in existence. The menu creation functions you need to use depend on whether the new pages are to be part of a new top menu item or whether they're to be a sub-menu of an existing top menu.
Reports are handled slightly differently, bceause the Reports menu is created dynamically by inspecting the contents of the "reports" directory.
In addition, you'd probably want to put something right at the front of the new pages that checks for a logged-in user so that, should someone launch the page without first logging in (specify the page URL directly), the page would redirect to the Index page.
I would like to add a new menu e.g. "my Family" and every item on this menu point to a custom page.
I'm a C++ developer, and for php I need some help and exemples on how to do this.
Thansk for the help
Check the script "toplinks.php" in each theme subdirectory to give you hints on how to add another top menu item. In the Cloudy theme, the code is located in "header.php". This might be the case for some other themes too - I can't be bothered to check, but the Xenea theme definitely uses "toplinks.php".
The functions that generate each top menu item are found in "includes/classes/class_menubar.php".
If I were you, I'd get the menus working first, before worrying about hiding the top menu or individual sub-menus based on the user's access rights.