New lower pricing for Subscriptions

50%off old price

Prefix use in send prayer chain message

About Support Prayer Requests Prefix use in send prayer chain message

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2770
    Avatar for Arjan_bArjan_b
    Member

    I have a request for a change to file includes/prayer_chain.php:

    Old code, line 54:
    $results=$wpdb->get_results('SELECT CONCAT_WS(" ", first_name,last_name) AS name FROM '.CA_PEO_TBL.' WHERE prayer_chain=1 ORDER BY last_name,first_name');

    Change to:

    $results=$wpdb->get_results('SELECT CONCAT_WS(" ", first_name,prefix,last_name) AS name FROM '.CA_PEO_TBL.' WHERE prayer_chain=1 ORDER BY last_name,first_name');

    …to add the prefix for a person’s name. By testing it on my live testing site, this seems to work.

    #3907
    Avatar for Arjan_bArjan_b
    Member

    Also, label for adding people is currently fixed (is not language dependent):

    Also in file includes/prayer_chain.php, line 142:

    echo ‘

    to be changed to

    echo ‘

    #3908
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    The name thing is better done

    $name=implode(" ",array_filter(array($row->first_name,$row->middle_name,$row->prefix,$row->last_name)));
    That uses all parts of the name where they exist and adds no spaces where they don’t

    Otherwise made changes suggested. Thanks

    #3910
    Avatar for Arjan_bArjan_b
    Member

    You’re right, thanks. The above version worked in my check but the new code is better fitting and takes more into account, perfect!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.