<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.phpgedview.net/en/index.php?action=history&amp;feed=atom&amp;title=Build_a_new_menu_%28customize_themes%29</id>
	<title>Build a new menu (customize themes) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.phpgedview.net/en/index.php?action=history&amp;feed=atom&amp;title=Build_a_new_menu_%28customize_themes%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.phpgedview.net/en/index.php?title=Build_a_new_menu_(customize_themes)&amp;action=history"/>
	<updated>2026-05-26T16:58:51Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://wiki.phpgedview.net/en/index.php?title=Build_a_new_menu_(customize_themes)&amp;diff=9601&amp;oldid=prev</id>
		<title>Nathanhaigh: How To:Build a new menu (customize themes) moved to Build a new menu (customize themes) over redirect: removed invalid namespace</title>
		<link rel="alternate" type="text/html" href="https://wiki.phpgedview.net/en/index.php?title=Build_a_new_menu_(customize_themes)&amp;diff=9601&amp;oldid=prev"/>
		<updated>2008-01-11T10:01:06Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/en/index.php/How_To:Build_a_new_menu_(customize_themes)&quot; class=&quot;mw-redirect&quot; title=&quot;How To:Build a new menu (customize themes)&quot;&gt;How To:Build a new menu (customize themes)&lt;/a&gt; moved to &lt;a href=&quot;/en/index.php/Build_a_new_menu_(customize_themes)&quot; title=&quot;Build a new menu (customize themes)&quot;&gt;Build a new menu (customize themes)&lt;/a&gt; over redirect: removed invalid namespace&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== add a new menu ==&lt;br /&gt;
You will find the concerning PHP-code in the file &amp;quot;'''header.php'''&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
Because every theme has his own menu-system, we will show you the essential changes as an example for the theme &amp;quot;Cloudy&amp;quot;. &amp;lt;br/&amp;gt;&lt;br /&gt;
The &amp;quot;header.php&amp;quot; for &amp;quot;Cloudy&amp;quot; you will find in the following path: &lt;br /&gt;
&lt;br /&gt;
 /phpGedView/themes/cloudy/header.php&lt;br /&gt;
&lt;br /&gt;
Open the file with a text-editor or with a html-editor.&amp;lt;br/&amp;gt;&lt;br /&gt;
Search for the first entry like:&lt;br /&gt;
&lt;br /&gt;
 $my_temp_menu= array();&lt;br /&gt;
&lt;br /&gt;
The following lines build the first menu-point in PGV, showed with the &amp;quot;Home&amp;quot;-icon.&amp;lt;br/&amp;gt;&lt;br /&gt;
All the stuff from this Home-menu (plus his submenus) is enclosed between &amp;quot;&amp;lt;td&amp;gt;&amp;quot; and &amp;quot;&amp;lt;/td&amp;gt;&amp;quot; -tags. &amp;lt;br/&amp;gt;&lt;br /&gt;
Every next &amp;quot;&amp;lt;td&amp;gt;&amp;quot; ... &amp;quot;&amp;lt;/td&amp;gt;&amp;quot; -bock encloses such a menu-icons with the concerning submenus.&amp;lt;br/&amp;gt;&lt;br /&gt;
A douzen menu-items are enclosed in a &amp;quot;&amp;lt;table&amp;gt;&amp;quot; ... &amp;quot;&amp;lt;/table&amp;gt;&amp;quot; -tag.&lt;br /&gt;
&lt;br /&gt;
In this table look for a code like this (for example the &amp;quot;charts&amp;quot;-menu):&lt;br /&gt;
&lt;br /&gt;
             $menu = array();&lt;br /&gt;
             $menu[&amp;quot;label&amp;quot;] = $pgv_lang[&amp;quot;charts&amp;quot;];&lt;br /&gt;
             $menu[&amp;quot;labelpos&amp;quot;] = &amp;quot;none&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;icon&amp;quot;] = $PGV_IMAGE_DIR.&amp;quot;/&amp;quot;.$PGV_IMAGES[&amp;quot;pedigree&amp;quot;][&amp;quot;large&amp;quot;];&lt;br /&gt;
         if (file_exists(&amp;quot;pedigree.php&amp;quot;)) $menu[&amp;quot;link&amp;quot;] = &amp;quot;pedigree.php&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;class&amp;quot;] = &amp;quot;menuitem&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;hoverclass&amp;quot;] = &amp;quot;menuitem_hover&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;flyout&amp;quot;] = &amp;quot;down&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;submenuclass&amp;quot;] = &amp;quot;submenu$ff&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;items&amp;quot;] = array();&lt;br /&gt;
 &lt;br /&gt;
         if (file_exists(&amp;quot;pedigree.php&amp;quot;)) {&lt;br /&gt;
             $submenu = array();&lt;br /&gt;
             $submenu[&amp;quot;label&amp;quot;] = $pgv_lang[&amp;quot;pedigree_chart&amp;quot;];&lt;br /&gt;
             $submenu[&amp;quot;labelpos&amp;quot;] = &amp;quot;right&amp;quot;;&lt;br /&gt;
             $submenu[&amp;quot;icon&amp;quot;] = $PGV_IMAGE_DIR.&amp;quot;/&amp;quot;.$PGV_IMAGES[&amp;quot;pedigree&amp;quot;][&amp;quot;small&amp;quot;];&lt;br /&gt;
             $submenu[&amp;quot;link&amp;quot;] = &amp;quot;pedigree.php&amp;quot;;&lt;br /&gt;
             $submenu[&amp;quot;class&amp;quot;] = &amp;quot;submenuitem$ff&amp;quot;;&lt;br /&gt;
             $submenu[&amp;quot;hoverclass&amp;quot;] = &amp;quot;submenuitem_hover$ff&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
With &amp;quot;copy and paste&amp;quot; take this code and put it between two &amp;lt;td&amp;gt;-blocks, &amp;lt;br/&amp;gt;&lt;br /&gt;
between two othes menu-icons, where you would place your new menu.&lt;br /&gt;
&lt;br /&gt;
Before the copied code write this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- here starts my new menu --&amp;gt;&lt;br /&gt;
     &amp;lt;td valign=&amp;quot;middle&amp;quot; width=&amp;quot;1&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
Delete the two whole lines beginning with:&lt;br /&gt;
&lt;br /&gt;
         if (file_exists(&amp;quot;&lt;br /&gt;
                             &lt;br /&gt;
and behind the copied code write this:&lt;br /&gt;
&lt;br /&gt;
             print_menu($menu);&lt;br /&gt;
         ?&amp;gt;&lt;br /&gt;
     &amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;!-- here ends my new menu --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result should be this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;!-- here starts my new menu --&amp;gt;&lt;br /&gt;
     &amp;lt;td valign=&amp;quot;middle&amp;quot; width=&amp;quot;1&amp;quot; &amp;gt;&lt;br /&gt;
         &amp;lt;?php&lt;br /&gt;
             $menu = array();&lt;br /&gt;
             $menu[&amp;quot;label&amp;quot;] = $pgv_lang[&amp;quot;charts&amp;quot;];&lt;br /&gt;
             $menu[&amp;quot;labelpos&amp;quot;] = &amp;quot;none&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;icon&amp;quot;] = $PGV_IMAGE_DIR.&amp;quot;/&amp;quot;.$PGV_IMAGES[&amp;quot;pedigree&amp;quot;][&amp;quot;large&amp;quot;];&lt;br /&gt;
             $menu[&amp;quot;class&amp;quot;] = &amp;quot;menuitem&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;hoverclass&amp;quot;] = &amp;quot;menuitem_hover&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;flyout&amp;quot;] = &amp;quot;down&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;submenuclass&amp;quot;] = &amp;quot;submenu$ff&amp;quot;;&lt;br /&gt;
             $menu[&amp;quot;items&amp;quot;] = array();&lt;br /&gt;
 &lt;br /&gt;
             $submenu = array();&lt;br /&gt;
             $submenu[&amp;quot;label&amp;quot;] = $pgv_lang[&amp;quot;pedigree_chart&amp;quot;];&lt;br /&gt;
             $submenu[&amp;quot;labelpos&amp;quot;] = &amp;quot;right&amp;quot;;&lt;br /&gt;
             $submenu[&amp;quot;icon&amp;quot;] = $PGV_IMAGE_DIR.&amp;quot;/&amp;quot;.$PGV_IMAGES[&amp;quot;pedigree&amp;quot;][&amp;quot;small&amp;quot;];&lt;br /&gt;
             $submenu[&amp;quot;link&amp;quot;] = &amp;quot;pedigree.php&amp;quot;;&lt;br /&gt;
             $submenu[&amp;quot;class&amp;quot;] = &amp;quot;submenuitem$ff&amp;quot;;&lt;br /&gt;
             $submenu[&amp;quot;hoverclass&amp;quot;] = &amp;quot;submenuitem_hover$ff&amp;quot;;&lt;br /&gt;
             print_menu($menu);&lt;br /&gt;
         ?&amp;gt;&lt;br /&gt;
     &amp;lt;/td&amp;gt;&lt;br /&gt;
 &amp;lt;!-- here ends my new menu --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we learn, how you can change the essental lines for to do what you want to do. &amp;lt;br/&amp;gt;&lt;br /&gt;
You have the '''$menu'''-block, who build the upper-icon you will see on the PGV-page&amp;lt;br/&amp;gt;&lt;br /&gt;
and the '''$submenu'''-block, who build the popup-menu with the submenu-entries on the PGV-page.&lt;br /&gt;
&lt;br /&gt;
Find an expressive '''label''' for every menu-entry, for example &amp;quot;my Family&amp;quot; and write it like this:&lt;br /&gt;
&lt;br /&gt;
             $submenu[&amp;quot;label&amp;quot;] = &amp;quot;my Family&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Design a '''new menu-icon''' with a drawing-program or you will find an existing one by Google.&amp;lt;br/&amp;gt; Store it with a new name for exemple &amp;quot;new-icon.gif&amp;quot; in the following path:&lt;br /&gt;
&lt;br /&gt;
 /phpGedView/themes/cloudy/images/new-meu.gif&lt;br /&gt;
&lt;br /&gt;
and call it in the code like this:&lt;br /&gt;
&lt;br /&gt;
             $menu[&amp;quot;icon&amp;quot;] = &amp;quot;themes/cloudy/images/menue.gif&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== Open an External Link ==&lt;br /&gt;
&lt;br /&gt;
For to open an external link '''in the same browser-windows''':&lt;br /&gt;
&lt;br /&gt;
 $submenu[&amp;quot;link&amp;quot;] = &amp;quot;http://www.frappr.com&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
For to open an external link '''in a new browser-windows''':&lt;br /&gt;
&lt;br /&gt;
 $submenu[&amp;quot;link&amp;quot;] = &amp;quot;http://www.frappr.com\&amp;quot; target=\&amp;quot;_blank\&amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
For to open an external link '''in a popup-windows''':&lt;br /&gt;
&lt;br /&gt;
 $submenu[&amp;quot;link&amp;quot;] = &amp;quot;????&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
== build a new HTML-text ==&lt;br /&gt;
&lt;br /&gt;
== Open a HTML-Text ==&lt;br /&gt;
&lt;br /&gt;
For to open a HTML-text '''between &amp;quot;header&amp;quot; and &amp;quot;footer&amp;quot;''':&lt;br /&gt;
&lt;br /&gt;
...until now we don't have any solution for this...&lt;br /&gt;
&lt;br /&gt;
We will need something like this:&lt;br /&gt;
&lt;br /&gt;
 $submenu[&amp;quot;link&amp;quot;] = &amp;quot;XYZ.php&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
and &amp;quot;XYZ.php&amp;quot; should do something like this:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
     print header.php;&lt;br /&gt;
     print something.html, useing theme &amp;quot;Cloudy&amp;quot;&lt;br /&gt;
     print footer.php;&lt;br /&gt;
 ?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How To]]&lt;/div&gt;</summary>
		<author><name>Nathanhaigh</name></author>
		
	</entry>
</feed>