#551 Support Contact Links

closed-accepted
5
2010-01-21
2009-12-13
ggpauly
No

Simplify code and allow (intended?) ability to specify either technical or genealogical support, both, or neither.

Current code does not allow display of only genealogical contact, although the config entry apparently allows this. This patch allows display of only genealogical contact, as well as the other possibilities.

Tested with trunk downloaded 12 Dec 2009. I believe this is pre-release 2.4.3

Todo: global names are misleading.

Here are the original followed by patched contact_links functions:

unpatched:
function contact_links() {
global $WEBMASTER_EMAIL, $SUPPORT_METHOD, $CONTACT_EMAIL, $CONTACT_METHOD, $pgv_lang;

$support_link=user_contact_link($WEBMASTER_EMAIL, $SUPPORT_METHOD);
$contact_link=user_contact_link($CONTACT_EMAIL, $CONTACT_METHOD);
if (!$support_link) {
$support_link=$contact_link;
}
if (!$contact_link) {
$contact_link=$support_link;
}
if (!$support_link) {
return '';
}
if ($support_link==$contact_link) {
return '<div class="contact_links">'.$pgv_lang['for_all_contact'].' '.$support_link.'</div>';
} else {
return '<div class="contact_links">'.$pgv_lang['for_support'].' '.$support_link.'<br />'.$pgv_lang['for_contact'].' '.$contact_link.'</div>';
}
}

patched:
function contact_links() {
global $WEBMASTER_EMAIL, $SUPPORT_METHOD, $CONTACT_EMAIL, $CONTACT_METHOD, $pgv_lang;

$support_link=user_contact_link($WEBMASTER_EMAIL, $SUPPORT_METHOD);
$contact_link=user_contact_link($CONTACT_EMAIL, $CONTACT_METHOD);
if (!$support_link && !$contact_link) {
return '';
}
if (!$contact_link) {
return '<div class="contact_links">'.$pgv_lang['for_support'].' '.$support_link.'</div>';
}
if (!$support_link) {
return '<div class="contact_links">'.$pgv_lang['for_contact'].' '.$contact_link.'</div>';
}
if ($support_link==$contact_link) {
return '<div class="contact_links">'.$pgv_lang['for_all_contact'].' '.$support_link.'</div>';
} else {
return '<div class="contact_links">'.$pgv_lang['for_support'].' '.$support_link.'<br />'.$pgv_lang['for_contact'].' '.$contact_link.'</div>';
}
}

Discussion

  • Gerry Kroll

    Gerry Kroll - 2010-01-06

    Thank you.

    This change will be in SVN very soon.

     
  • Gerry Kroll

    Gerry Kroll - 2010-01-06
    • assigned_to: nobody --> canajun2eh
    • status: open --> open-accepted
     
  • Gerry Kroll

    Gerry Kroll - 2010-01-06

    Attached file "functions_print.zip" is for PGV version 4.2.3

    Unzip and copy results to the folder where PGV is installed. This will replace file "includes/functions/functions_print.php".

     
  • Gerry Kroll

    Gerry Kroll - 2010-01-06

    File "includes/functions/functions_print.php" for 4.2.3

     
  • Gerry Kroll

    Gerry Kroll - 2010-01-06
    • status: open-accepted --> pending-accepted
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending-accepted --> closed-accepted
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks