Currently, the look and feel of phpgedview is heavily
dominated by the menu system. In at least my firefox,
it looks... well, not so great!
Rather than using a custom menubar class and doing
everything that you currently do, why not consider
extending HTML_Menu
(http://pear.php.net/package/HTML_Menu)?
You can use javascript and css to transform the menu
into a dropdown affair without much sweat at all from a
skeleton of ULs and LIs.
You can still do all of your file_exists checks; and
you can still include images inline; as well as getting
a much neater and smaller lot of HTML.
See attached files; you'll need to do a
pear install HTML_Menu
and to get it working in Internet Explorer 6 or less
you'll need to use the csshover.htc workaround
(http://www.xs4all.nl/~peterned/csshover.html)
If you wanted to implement it, obviously, you'd split
this up into several files - css,
HTML_Menu_UnorderedListRenderer.php, toplinks.html,
MenuHelper.php to fetch the items.
Example
Logged In: YES
user_id=1153173
Agreed, existing toplinks has too much embedded styling and
tables and things, it could be a lot cleaner and easier to
configure just with css.
Logged In: YES
user_id=300048
The current menu system has been heavily developed to work
cross-browser and in the many languages that PGV supports.
A CSS only menu system does not work fully cross-browser or
in some languages, especially RTL languages.
What CSS control do you want over the menus that you do not
already have?
Developement is currently being done on making the menu
system more configurable so that admins can rearrange menu
items or disable them.
--John
Logged In: YES
user_id=197121
I want it to change from:
http://svn.sourceforge.net/viewvc/\*checkout*/phpgedview/trunk/phpGedView/themes/ocean/toplinks.html?content-type=text%2Fplain
To:
$menu = new GEDMenuNavigationMenu();
print $menu->render();
And the output from attachment 2, examplemenu.html to
something akin to attachment 3, examplemenu2.html
Example Menu 1 - Current output.
Simple, UL and LI menu
Logged In: YES
user_id=1153173
I might have missed something, I'm new to GedView but could
the hardcoded styling (ie the line breaks and the images)
not be removed from the php and put in place with just CSS?
I'm not suggesting the functionality of the menus (the
appearing and disappearing) be done just in CSS, I'm aware
for some browsers the javascript is necessary, but even that
could be separated out, see
http://alistapart.com/articles/dropdowns/