]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/theme.php
Merge pull request #12434 from MarekBenjamin/issue_make_balancing_optional
[friendica.git] / view / theme / frio / theme.php
index f4daed4d6c1cb2f698f2a6afdb322be078a9b298..2422adf9375d897c4defa51fac4b58d47a9b6bff 100644 (file)
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  *
  * Name: frio
- * Description: Bootstrap V3 theme. The theme is currently under construction, so it is far from finished. For further information have a look at the <a href="https://github.com/friendica/friendica/tree/develop/view/theme/frio/README.md">ReadMe</a>.
- * Version: V.0.8.5
+ * Description: Responsive theme based on a modern HTML/CSS/Javascript framework.
+ * Version: V.1.0
  * Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus>
+ * Maintainer: Hypolite Petovan <https://friendica.mrpetovan.com/profile/hypolite>
  */
 
 use Friendica\App;
@@ -53,8 +54,6 @@ function frio_init(App $a)
        global $frio;
        $frio = 'view/theme/frio';
 
-       // disable the events module link in the profile tab
-       $a->setThemeInfoValue('events_in_profile', false);
        $a->setThemeInfoValue('videowidth', 622);
 
        Renderer::setActiveTemplateEngine('smarty3');
@@ -107,7 +106,7 @@ function frio_item_photo_links(App $a, &$body_info)
                        $newlink = str_replace($matches[0], "/photo/{$matches[1]}", $link);
 
                        // Add a "quiet" parameter to any redir links to prevent the "XX welcomes YY" info boxes
-                       $newlink = preg_replace('/href="([^"]+)\/redir\/([^"]+)&url=([^"]+)"/', 'href="$1/redir/$2&quiet=1&url=$3"', $newlink);
+                       $newlink = preg_replace('#href="([^"]+)/contact/redir/(\d+)&url=([^"]+)"#', 'href="$1/contact/redir/$2&quiet=1&url=$3"', $newlink);
 
                        // Having any arguments to the link for Colorbox causes it to fetch base64 code instead of the image
                        $newlink = preg_replace('/\/[?&]zrl=([^&"]+)/', '', $newlink);
@@ -179,7 +178,7 @@ function frio_contact_photo_menu(App $a, &$args)
 
        // Add to pm link a new key with the value 'modal'.
        // Later we can make conditions in the corresponding templates (e.g.
-       // contact_template.tpl)
+       // contact/entry.tpl)
        if (strpos($pmlink, 'message/new/' . $cid) !== false) {
                $args['menu']['pm'][3] = 'modal';
        }
@@ -236,6 +235,9 @@ function frio_remote_nav(App $a, array &$nav_info)
                        // user menu
                        $nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'], DI::l10n()->t('Status'), '', DI::l10n()->t('Your posts and conversations')];
                        $nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/profile', DI::l10n()->t('Profile'), '', DI::l10n()->t('Your profile page')];
+                       // Kept for backwards-compatibility reasons, the remote server may not have updated to version 2022.12 yet
+                       // @TODO Switch with the new routes by version 2023.12
+                       //$nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/photos', DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
                        $nav_info['nav']['usermenu'][] = [$server_url . '/photos/' . $remoteUser['nick'], DI::l10n()->t('Photos'), '', DI::l10n()->t('Your photos')];
                        $nav_info['nav']['usermenu'][] = [$server_url . '/profile/' . $remoteUser['nick'] . '/media', DI::l10n()->t('Media'), '', DI::l10n()->t('Your postings with media')];
                        $nav_info['nav']['usermenu'][] = [$server_url . '/calendar/', DI::l10n()->t('Calendar'), '', DI::l10n()->t('Your calendar')];