I have a test such as the following;
// Fourth sub-menu (visible only to users with site Admin rights)
if (PGV_USER_IS_ADMIN) {
$submenu = new Menu("About This Data", "custom link #2");
$submenu->addClass("submenuitem$ff", "submenuitem_hover$ff");
$menu->addSubmenu($submenu);
}
I would like to test instead if I'm currently using the gedfile Scott.ged. What is the proper if statement?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a test such as the following;
// Fourth sub-menu (visible only to users with site Admin rights)
if (PGV_USER_IS_ADMIN) {
$submenu = new Menu("About This Data", "custom link #2");
$submenu->addClass("submenuitem$ff", "submenuitem_hover$ff");
$menu->addSubmenu($submenu);
}
I would like to test instead if I'm currently using the gedfile Scott.ged. What is the proper if statement?
The following constants might help:
PGV_GED_ID : the currently active internal GEDCOM ID
PGV_GEDCOM : file name of that curretnly active GEDCOM
The following function might also help:
get_gedcom_from_id($ged_id)
Input is any valid GEDCOM number. Output is the GEDCOM file name to match.
Thanks! The following works great:
if (PGV_GEDCOM=="HestonTest.ged"){
$submenu = new Menu("Link to Scott GEDCOM", "http://www.hestonscottgen.com/phpgedview/individual.php?pid=I581&ged=ScottMC.ged");
$submenu->addClass("submenuitem$ff", "submenuitem_hover$ff");
$menu->addSubmenu($submenu);
}