Menu

#973 Allow "Add unlinked.." from all pages

phpGedView
open
nobody
5
2008-04-25
2008-04-25
Birchy
No

Instead of having to go to the Admin page to "Add unlinked person", can we activate that from all pages?

In the resulting dialog, can we add a drop-down list of Gedcom, defaulting to the most recent?

Discussion

  • Anonymous

    Anonymous - 2008-04-26

    Logged In: YES
    user_id=1910459
    Originator: NO

    Please DON'T do this. We have enough trouble with users entering incorrect data as it is. Allowing free-for all addition of unlinked INDIs will be a disaster.

    Its such a rare occurrence (or should be) having it hidden away where it is is great.

     
  • Greg Roach

    Greg Roach - 2008-05-22

    Logged In: YES
    user_id=1466942
    Originator: NO

    You can easily customise the menus, using a customised theme.

     
  • Birchy

    Birchy - 2008-05-22

    Logged In: YES
    user_id=1323533
    Originator: YES

    I'm barely a php/mysql programmer and don't know any javascript or css. Do you have time to grab the required code and tell me which file to paste it into, so I can kludge my copy?

    kiwi_pgv: Many of us add new INDIs constantly. Just because you don't... Also, I would bet that although the program is great for collaboration, very few installs use collaboration. As with all features that don't have a consensus, let's make it a config option. Even so, if you are having problems with other users, use the features to review edits before making them permanent.

     
  • Anonymous

    Anonymous - 2008-05-22

    Logged In: YES
    user_id=1910459
    Originator: NO

    Birchy, perhaps I'm misunderstanding you.

    Are you really saying you constantly add unlinked INDI's - people with no connection to an existing person or family on your GEDCOM file?

     
  • Birchy

    Birchy - 2008-05-23

    Logged In: YES
    user_id=1323533
    Originator: YES

    Yes, I have several "One Name Studies" that I'm working on. Eventually, I merge a lot of these people into their families, as I discover the connections.

     
  • Anonymous

    Anonymous - 2008-07-17

    Logged In: YES
    user_id=1910459
    Originator: NO

    birchy

    Did you ever do this?

    If not, I have it working on my site now, to test it, so can help you add a menu item for it yourself.

     
  • Birchy

    Birchy - 2008-07-18

    Logged In: YES
    user_id=1323533
    Originator: YES

    I did cobble together something that works. It's ugly, so I'ld like to see your work.

    I just have a big text link at the top of every page "Add unlinked person".
    I added <a href="javascript: Add an unlinked person" onclick="addnewchild(''); return false;">&nbsp;&nbsp;Add an unlinked person</a> to line 25 of the header.html file in the Xenea theme (which I always use). I don't care if anyone else uses a different theme, as I'm really the only editor.

     
  • Anonymous

    Anonymous - 2008-07-18

    Logged In: YES
    user_id=1910459
    Originator: NO

    Find the file /includes/extras/sample_optional_menu.php
    Replace everything from row 76 (//-- main Optional menu item) to row 114 (the last, which is just ?> with this code: (between the dotted lines)
    -----------------------------------------------------------------
    if (PGV_USER_CAN_EDIT) {
    $menu = new Menu("Add Unlinked", "#", "down");
    if (!empty($PGV_IMAGES["gedcom"]["large"]))
    $menu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["large"]);
    $menu->addClass("menuitem$ff", "menuitem_hover$ff", "submenu$ff");
    $menu->addOnclick("onclick=addnewchild(''); return false;");
    } else {
    $menu = new Menu("Add Unlinked", "", "down");
    if (!empty($PGV_IMAGES["gedcom"]["large"]))
    $menu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["large"]);
    $menu->addClass("menuitem$ff", "menuitem_hover$ff", "submenu$ff");
    $menu->addOnclick("onclick=addnewchild(''); return false;");
    }
    // Sub-menus invisible to Search robots
    if (empty($SEARCH_SPIDER)) {
    // Sub-menus visible only to users with Edit rights
    if (PGV_USER_CAN_EDIT) {
    $submenu = new Menu($pgv_lang["add_unlinked_person"], "#");
    $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff");
    if (!empty($PGV_IMAGES["indis"]["small"]))
    $submenu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["indis"]["small"]);
    $submenu->addOnclick("onclick=addnewchild(''); return false;");
    $menu->addSubmenu($submenu);

    $submenu = new Menu($pgv_lang["add_unlinked_source"], "#");
    $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff");
    if (!empty($PGV_IMAGES["menu_source"]["small"]))
    $submenu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["menu_source"]["small"]);
    $submenu->addOnclick("onclick=addnewsource(''); return false;");
    $menu->addSubmenu($submenu);
    }
    }
    ?>
    -----------------------------------------------------------------------
    Then save the file back into the same place, but change the name to 'optional_menu.php' (i.e. remove the 'sample_' from the front). Keep the sample version for future reference, as it shows how to add other types of sub-menus. Upload to server, and you're done.
    This works well on my site. I've included "Add an unlinked Source" for good measure, but you can remove that if you want. If you only want the one "Add unlinked person" option, you could actually remove the entire submenu section, and just have the main menu item. I've also ensured that "Add an unlinked person" is the default acton from the large icon, as well as the firt item in the sub-menu. You will also be able to see in the code where to change the icons if you want different ones.

    Hope it works OK.

     
  • Birchy

    Birchy - 2008-07-18

    Logged In: YES
    user_id=1323533
    Originator: YES

    Nope, didn't work for me. First the PGV_USER_CAN_EDIT gives me an "undefined constant" error messages. Second, even if I strip it down to just:

    $menu = new Menu("Add Unlinked", "", "down");
    if (!empty($PGV_IMAGES["gedcom"]["large"]))
    $menu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["large"]);
    $menu->addClass("menuitem$ff", "menuitem_hover$ff", "submenu$ff");
    $menu->addOnclick("onclick=addnewchild(''); return false;");

    ?>

    I get nothing. No icon, no errors.

    Ideas?

     
  • Anonymous

    Anonymous - 2008-07-18

    Logged In: YES
    user_id=1910459
    Originator: NO

    Yeah, that suggests you're using an older version of PGV than I expected. Which version are you on? I should be able to adjust it to match.

    Email me on admin at our-families dot info, then I can send you the whole file once its done. I won't be able to test it though, so may need a couple of goes.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.