Shiv'a: Entering Synagogue Friday Night

A mourner enters the synagogue on Friday evening before Mizmor shir l'yom haShabbat (after the main part of Kabbalat Shabbat has finished).
Reason Mizmor shir is the actual starting point of Shabbat.
The congregation stands and, as the mourners walk in, greets the mourners with “HaMakom yenacheim etchem b'toch she'ar aveilei tzion v'yrushalayim.