New lower pricing for Subscriptions

50%off old price

Small names issue on publishing directory

About Support Directory Small names issue on publishing directory

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

    Hi,

    When I want to publish a directory overview using the shortcode

    [church_admin type="address-list" member_type_id=1,2,3,5,6 photo=1 map=1 site_id=0]

    it will indeed show all the members I want. However I see that there is a small printing issue coming up…

    Quite a few names use the prefix on the name, but between the prefix and the last name a space is missing.

    I.e. it’s showing “Arjan van denBerg” instead of the correct version “Arjan van den Berg”.

    I believe that the next change should be fixing that. In ‘/display/address-list.php’ line 130:

    $last_name=esc_html($people->prefix.$people->last_name);

    should be changed to

    $last_name=esc_html($people->prefix.’ ‘.$people->last_name);

    Would this make sense?

    #3894
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    That would work, but the extra space would be there if no prefix.
    I’m changing lines to…

    if(!empty($prefix) &&!empty($row->prefix)){ $Prefix=$people->prefix.’ ‘;}else{$Prefix=”;}
    $last_name=esc_html($Prefix.$people->last_name);
    #3895
    Avatar for Arjan_bArjan_b
    Member

    Hmm, the previous did not seem to add an extra space when there was no prefix, but looking through your solution makes it a lot more careful on the actual use. Thanks for that! Only one thing though: I think you should make that

    if(!empty($prefix) &&!empty($people->prefix)){ $Prefix=$people->prefix.’ ‘;}else{$Prefix=”;}
    $last_name=esc_html($Prefix.$people->last_name);

    (so $people->prefix instead of $row->prefix Cool )

    #3896
    Avatar for Andy MoyleAndy Moyle
    Keymaster

    Yes of course!

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